How to merge a branch in Git to the Master branch code example Example: git merge two branches git checkout targetBranch git merge sourceBranch