Best Way To Merge A Git Branch Into Master

Posted by Wei Xia on September 2, 2016 | Hits:



There are two branches, master and develop. What is the best and safest way merge develop branch into master branch?


Here is the solution. After you commit everything in develop branch.

Do as following steps:

git checkout master
git pull origin master
git merge develop
git push origin master

As other answers mentioned, this solution is only acceptable for a small project, like only few branches, and other people won’t make changes in master branch. From my personal perspective, if there are some conflicts between master and develop branch, this might not be a good way to solve this problem.


Best (and safest) way to merge a git branch into master

This is the end of post