Last active
September 17, 2015 07:40
-
-
Save matthewrwilton/9cb0a1541649a9536310 to your computer and use it in GitHub Desktop.
A powershell function for deleting .orig files left after resolving Git merges. Prompts before deleting each file.
This file contains hidden or 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
function git-rm-orig { | |
git status -su | select-string -pattern "\.orig$" | ForEach-Object { | |
$_.ToString().TrimStart("?? ") | |
} | ForEach-Object { | |
rm $_ -Confirm | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment