I was pulling in my .emacs directory, and hit the following conflict:
CONFLICT (add/add): Merge conflict in elisp/dired-details+.el
Git status showed the following:
Unmerged paths:
# (use "git add/rm <file>..." as appropriate to mark resolution)
# both added: elisp/dired-details+.el
Okay, so git suggested using git rm
. I want to completely replace the local file with the file I'm pulling in, so it seems kind of sort of sensible... So I do git rm elisp/dired-details+.el
and git merge
. I get:
git merge: fatal: You have not concluded your merge (MERGE_HEAD exists). Please, commit your changes before you can merge.
Okay, fine: git commit -a -m "ugh merge conflicts"
; git pull origin master
.
Now everything merges fine, except for I am missing dired-details+.el
, I am kind of confused, and I would like to know the answers to the following:
- How do I undo
git-rm
and get that file from the remote branch?.. - Why was there a conflict in the first place?.. What's going on here with
add/add
?.. - What should I have done instead of
git-rm
'ing the file I wanted to replace?..