I had a small conflict in a .h
header file in a project I'm working on. This project is tracked in Git.
Fortunately, the conflict was very simple to solve. I used
git mergetool
And chose the default (opendiff
) which seemed to be FileMerge on my Mac. I made the appropriate changes, saved the file, and closed.
Git then asked me if the merge was successful, I said yes:
Was the merge successful? [y/n] y
But now, I have:
> git st
# On branch develop
# Changes to be committed:
# modified: MyHeader.h
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# MyHeader.h.BACKUP.52920.h
# MyHeader.h.BASE.52920.h
# MyHeader.h.LOCAL.52920.h
# MyHeader.h.REMOTE.52920.h
# MyHeader.h.orig
Which of those extra junk conflict files were created by FileMerge, and which by Git?
And more importantly: How do I remove them?
git clean -n/-f
has been the go-to for a long time. You can also specify a path at the end, if you only want to perform the clean on a subfolder. – Capacitance