How to Merge Branch into Master Branch


If you are working on your project and ready to merge your release branch into master (production) then you can follow the below steps in git command line,

Step 1: Make sure your code is committed on your release branch, of the feature branch that you are going to commit to master.

Step 2: Move current project to master branch
# git checkout master


Step 3: Merge your branch to master branch
# git merge release-branch


Step 4: Commit the branch into master branch
# git commit -a


❗️Though we do not encourage to make use of the words master/slave as we really care about Diversity and Inclusion, this article is just for demonstration purpose and encourage everyone to make use of alternate words for repos like production/staging




Top Hashtags:

Advertisements

Advertisements




Advertisements