git – merge conflict when local is deleted but file exists in remote

You should resolve the conflicts as you see fit. If the file really is supposed to be removed, and you will be publishing that change to origin, remove it again:

git rm path/to/file

If the file should in fact be tracked still, add it (the version in the work tree will be the version from origin):

git add path/to/file

After doing either of those to resolve the conflict, commit the merge.

Leave a Comment