Git Merge Conflict - Remote File Deleted Local File Changed

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

I merged in changes from another branch but I am getting conflicts because a file has been deleted on the remote branch but has changes on local branch.

I would like to delete the file - I tried git rm path/to/file but it says file: needs merge. What is the best way of removing the file and committing the merge?

Answers

Try using the --force parameter:

git rm --force <file>

If you want to keep the file in filesystem:

git rm --cached <file>

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/11648105/git-merge-conflict-remote-file-deleted-local-file-changed

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils