Best Way To Merge A Git Branch Into Master
Question:
There are two branches,
masteranddevelop. What is the best and safest way mergedevelopbranch intomasterbranch?
Answer:
Here is the solution. After you commit everything in develop branch.
Do as following steps:
1 | git checkout 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.
Reference
Best (and safest) way to merge a git branch into master
This is the end of post