Skip to content

Instantly share code, notes, and snippets.

@matthewrwilton
Last active September 17, 2015 07:40
Show Gist options
  • Save matthewrwilton/9cb0a1541649a9536310 to your computer and use it in GitHub Desktop.
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.
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