repository - Transferring git files to another branch -


i have android device source code uploaded git repository. code on master branch. want add different android source code (different android version) in same repo, on different branch. but, want categorize each source tree in own branch.

so, want is:

  1. create new branch called cm10
  2. move code master branch cm10 branch
  3. completely delete master branch

i new git, can create new branch (new branch called cm10 in case), don't know how rest.

please add comments on each command does. way me learn more git.

i better dont ask why wanna this...

git checkout -b cm10 // checkout cm10 branch (-b creates it) git merge master // shoud not neccessary when branch created git branch -d master // delete master branch  // if have remote repository may want to: git push origin cm10 // create new remote branch git push origin :master // remove master branch 

Comments