diff --git a/README.md b/README.md index cead3b552..e8acf8f6a 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,7 @@ If you aren't using any zsh frameworks, or if you're a bash user, do the followi | `git-related` | Mislav Marohnić's [dotfiles](https://github.com/mislav/dotfiles) | Show other files that often get changed in commits that touch `` | | `git-reset-with-fire` | Joe Block | Hard reset the working directory, then zap any files not in git | | `git-restore-mtime` | Rodrigo Silva (MestreLion) | Change mtime of files based on commit date of last change | +| `git-rm-deleted-from-repo` | Joe Block | Removes files you deleted with `rm` from the repo for you | | `git-root-directory` | Joe Block | Prints the root of the git repository you're in | | `git-run-command-on-revisions` | Gary Bernhardt's [dotfiles](https://github.com/garybernhardt/dotfiles) | Runs a given command over a range of Git revisions | | `git-shamend` | Danielle Sucher's [git-shamend](http://www.daniellesucher.com/2014/05/08/git-shamend/) blog post | Amends your staged changes as a fixup (keeping the pre-existing commit message) to the specified commit, or HEAD if no revision is specified | diff --git a/bin/git-rm-deleted-from-repo b/bin/git-rm-deleted-from-repo new file mode 100755 index 000000000..1e552f8c9 --- /dev/null +++ b/bin/git-rm-deleted-from-repo @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +# +# Author: Joe Block +# License: Apache 2.0 +# https://github.com/unixorn/git-extra-commands/blob/master/LICENSE +# +# Delete files from the repo that you've deleted with `rm` instead of `git rm` + +exec git rm $(git ls-files -d)