Fixing broken references in git merge