Created
January 12, 2012 16:42
-
-
Save seanbehan/1601516 to your computer and use it in GitHub Desktop.
Recursively Delete .Orig Files After Failed Git Merge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# recursively delete original files after a git merge failure | |
find . -name *.orig -delete |
git clean -f */*.orig
or create a alias
git config alias.cleanall "clean -f */*.orig"
then just call
git cleanall
recurse deeper: git clean -f */.orig
We must go deeper
$ git clean -f ./**/*.orig
Git clean is recursive. Just do:
git clean *.orig
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well, seanbehan, that will delete ALL untracked files in that directory, not just .orig files.