Add git_tag_force rule

This adds `--force` to `git tag` when needed. For example:

    $ git tag alert
    fatal: tag 'alert' already exists
    $ fuck
    git tag --force alert [enter/↑/↓/ctrl+c]
    Updated tag 'alert' (was dec6956)
    $
This commit is contained in:
Joseph Frazier
2017-01-27 19:38:34 -05:00
parent a015c0f5e2
commit 8da4dce5f2
3 changed files with 32 additions and 0 deletions
+1
View File
@@ -189,6 +189,7 @@ using the matched rule and runs it. Rules enabled by default are as follows:
* `git_remote_seturl_add` – runs `git remote add` when `git remote set_url` on nonexistant remote;
* `git_stash` – stashes you local modifications before rebasing or switching branch;
* `git_stash_pop` – adds your local modifications before popping stash, then resets;
* `git_tag_force` &ndash; adds `--force` to `git tag <tagname>` when the tag already exists;
* `git_two_dashes` &ndash; adds a missing dash to commands like `git commit -amend` or `git rebase -continue`;
* `go_run` &ndash; appends `.go` extension when compiling/running Go programs;
* `gradle_no_task` &ndash; fixes not found or ambiguous `gradle` task;