by nodesocket · 13y ago · 0 comments
git checkout -b bugFix
git commit
git checkout master
git commit
git merge bugFix master
And git branch bugFix
git commit
git checkout master
git commit
git merge bugFix mastertry it in the website and you’ll see that in the second case bugFix never changes. the merge will say nothing needs to be done because bugFix already contains all changesets in master.
git branch bugFix
does not automatically check it out, so you'd have to follow it up with git checkout bugFix
but if you do git checkout -b bugFix
it will create the branch and then check it out all in one step.