Skip to content

Instantly share code, notes, and snippets.

@originalhat
Created January 10, 2013 22:30
Show Gist options
  • Save originalhat/4506386 to your computer and use it in GitHub Desktop.
Save originalhat/4506386 to your computer and use it in GitHub Desktop.

git rm $(git ls-files -d)

➜  demo git:(master) rm README.rdoc 
➜  demo git:(master) ✗ g s
 D README.rdoc
➜  demo git:(master) ✗ git rm $(git ls-files -d) 
rm 'README.rdoc'
➜  demo git:(master) ✗ g s
D  README.rdoc

g a -u

➜  demo git:(master) rm README.rdoc 
➜  demo git:(master) ✗ g s
 D README.rdoc
➜  demo git:(master) ✗ g a -u
➜  demo git:(master) ✗ g s
D  README.rdoc
@originalhat
Copy link
Author

NOTED BENEFIT OF OPTION A!

➜  demo git:(master) ✗ g s
 M Gemfile
 D README.rdoc
➜  demo git:(master) ✗ git rm $(git ls-files -d) 
rm 'README.rdoc'
➜  demo git:(master) ✗ g s
 M Gemfile
D  README.rdoc

(doesn't included modified files)

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