how to merge a git branch into another locally in git code example Example: git merge branch to another branch git checkout targetBranch git merge sourceBranch