I have two branches, master and dev. I always work on dev and only check code into the master branch once it\'s been approved for production use. When I do so, I have to do
A lot of times you're coming from the branch you would like to merge the current branch into. In that case you could do:
git co - && git merge @{-1}
for example:
git checkout somebranch // (while on master) // add some commits git co - && git merge @{-1} // will merge somebranch into master