how to merge 2 brances code example Example: git merge two branches git checkout targetBranch git merge sourceBranch