Git Switching branch Git Switching branch git git

Git Switching branch


git fetch Cgit checkout C/stable-branchgit checkout -b myCopy

Then myCopy is a local (copied) branch of C's stable one.


In two lines:
git fetch C
git checkout -b myCopy -t C/stable-branch

myCopy is now a local branch of C/stable-branch, and is tracking it, so you can do git push and git pull without a refspec.