How to merge one branch to another in Git?
First, you need to checkout into the target branch where you want to merge. Then, run the command git merge
with branch name, you want to merge into the current branch.
Example to merge current dev branch into master:
Let us suppose your current branch is dev
and you want to merge dev
into master
branch.
git checkout master
git merge dev
Learn more about the similar topics:
Tutorials |
---|
No Content Found. |
Exercises & Assignments |
---|
No Content Found. |
Interview Questions & Answers |
---|
No Content Found. |