When I do a merge conflict resolution with Kdiff3 (and other merge tool I tried) I noticed that on resolution a *.orig
file is created. Is there a way for it to not create that extra file?
When I do a merge conflict resolution with Kdiff3 (and other merge tool I tried) I noticed that on resolution a *.orig
file is created. Is there a way for it to not create that extra file?
A possible solution from git config
:
git config --global mergetool.keepBackup false
After performing a merge, the original file with conflict markers can be saved as a file with a
.orig
extension.
If this variable is set tofalse
then this file is not preserved.
Defaults totrue
(i.e. keep the backup files).
The alternative being not adding or ignoring those files, as suggested in this gitguru article,
git mergetool
saves the merge-conflict version of the file with a “.orig
” suffix.
Make sure to delete it before adding and committing the merge or add*.orig
to your.gitignore
.
Berik suggests in the comments to use:
find . -name *.orig
find . -name *.orig -delete
Charles Bailey advises in his answer to be aware of internal diff tool settings which could also generate those backup files, no matter what git settings are.
.bak
, as mentioned in its manual).So you need to reset those settings as well.