Skip to content

Instantly share code, notes, and snippets.

@jackdempsey
Created June 13, 2012 19:54
Show Gist options
  • Save jackdempsey/2926081 to your computer and use it in GitHub Desktop.
Save jackdempsey/2926081 to your computer and use it in GitHub Desktop.
git rm `git status | grep deleted | cut -f2 -d: | xargs`
@adambair
Copy link

Same thing?

git status | grep deleted | awk {'print $3'} | xargs git rm

@jackdempsey
Copy link
Author

j, i still haven't used that paste command ever. had to man it up to even have a clue about it

nice adam, i don't use awk nearly enough.

@adambair
Copy link

even better:

alias gst='git status'
alias grm="gst | grep deleted | awk {'print \$3'} | xargs git rm"

grm and done ;)

@jackdempsey
Copy link
Author

totally, i definitely use gst, and also gco, gba, ga, and a whole slew of them. i love me some aliases :-)

@jackdempsey
Copy link
Author

Ahh, now I get paste. I think I used to do that with vim and split panes. I like, thx for the tip!

@jwplmr
Copy link

jwplmr commented Jul 3, 2012

OK great. I wasn't sure if you didn't understand paste or the anonymous fd's. The "here fd" trick is wild to me. I changed my github account name (to essentially fake being an org) and got all confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment