Assume that I’ve got a project with two branches. One is master and the other is dev. I’m using git and do either of the following:
Case 1
git checkout master
git merge dev
Case 2
git checkout dev
git merge master
My question: What is the difference of case 1 and case 2?
Will checkout the ‘master’ branch and merge from the ‘dev’ branch. Any applicable changes within ‘dev’ will be in ‘master’ once this command has completed.
Will checkout the ‘dev’ branch and merge from the ‘master’ branch. Any applicable changes within ‘master’ will be in ‘dev’ once this command has completed.
For more information, take a look at Basic Branching and Merging.