how to merge a branch to current branch git code example Example: merge branch to branch git checkout master git merge new-branch git push