Git - Cleaning up .orig files

After resolving merge conflicts you might find that you have a plethora of *.orig files now in your local copy of your repository. The easiest way I've found to get rid of them is to run:

cd <path to your repo>
find . -name '*.orig' -delete

If you want to prevent the merge operation from creating these *.orig files in the first place you can run:

git config --global mergetool.keepBackup false

Wes Shaddix

Read more posts by this author.