Skip to content

Commit bfd73eb

Browse files
committed
Add git-rm-deleted-from-repo helper script
1 parent e00d695 commit bfd73eb

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ If you aren't using any zsh frameworks, or if you're a bash user, do the followi
186186
| `git-related` | Mislav Marohnić's [dotfiles](https://github.com/mislav/dotfiles) | Show other files that often get changed in commits that touch `<file>` |
187187
| `git-reset-with-fire` | Joe Block <jpb@unixorn.net> | Hard reset the working directory, then zap any files not in git |
188188
| `git-restore-mtime` | Rodrigo Silva (MestreLion) <linux@rodrigosilva.com> | Change mtime of files based on commit date of last change |
189+
| `git-rm-deleted-from-repo` | Joe Block <jpb@unixorn.net> | Removes files you deleted with `rm` from the repo for you |
189190
| `git-root-directory` | Joe Block <jpb@unixorn.net> | Prints the root of the git repository you're in |
190191
| `git-run-command-on-revisions` | Gary Bernhardt's [dotfiles](https://github.com/garybernhardt/dotfiles) | Runs a given command over a range of Git revisions |
191192
| `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 |

bin/git-rm-deleted-from-repo

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Author: Joe Block <jpb@unixorn.net>
4+
# License: Apache 2.0
5+
# https://github.com/unixorn/git-extra-commands/blob/master/LICENSE
6+
#
7+
# Delete files from the repo that you've deleted with `rm` instead of `git rm`
8+
9+
exec git rm $(git ls-files -d)

0 commit comments

Comments
 (0)