ok so apparently to create a new git branch on the remote repository we need:
git push origin origin:refs/heads/sandbox
git fetch origin
git checkout --track -b sandbox origin/sandbox
git pull
Now if I want to switch back to the master branch I can just do
git checkout master
If I want to switch back to sandbox after going back to master, do I need
git checkout –track -b sandbox
origin/sandbox
or just
git checkout sandbox
git checkout sandboxwill work. When you did thecheckout -b sandbox origin/sandbox, you set up a local branch namedsandboxwhich will track the remoteorigin/sandbox. To get the latest changes from upstream into your local copy, dogit pullwhen on thesandboxbranch.