Languages

Git - how to merge branch to master?

0 points
Asked by:
DoLLot
394

How to merge a new branch to the master branch using Git Bash?

1 answer
0 points
Answered by:
DoLLot
394

First thing you need to do is make sure you are on the branch you want to merge to, so change branch to master using:

git checkout master

then merge new_branch

git merge new_branch

 

Safe way if you are using remote repository:

git checkout master
git pull origin master
git merge new_branch
git push origin master
0 comments Add comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join