Add git_rm_staged rule for removing locally staged changes

It would be nice if `thefuck` could help me `git rm` a file I had
already staged. This rule, adapted from `git_rm_local_modifications`,
does that.
This commit is contained in:
Joseph Frazier
2017-02-26 19:16:15 -05:00
parent 91c27e1a62
commit 42ec01dab1
3 changed files with 48 additions and 0 deletions
+1
View File
@@ -186,6 +186,7 @@ using the matched rule and runs it. Rules enabled by default are as follows:
* `git_rebase_no_changes` – runs `git rebase --skip` instead of `git rebase --continue` when there are no changes;
* `git_rm_local_modifications` – adds `-f` or `--cached` when you try to `rm` a locally modified file;
* `git_rm_recursive` – adds `-r` when you try to `rm` a directory;
* `git_rm_staged` – adds `-f` or `--cached` when you try to `rm` a file with staged changes
* `git_rebase_merge_dir` – offers `git rebase (--continue | --abort | --skip)` or removing the `.git/rebase-merge` dir when a rebase is in progress;
* `git_remote_seturl_add` – runs `git remote add` when `git remote set_url` on nonexistant remote;
* `git_stash` – stashes your local modifications before rebasing or switching branch;