From 44c6728aa04eaf23122b9e6f03ad9027512bf6f6 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhonoshin Date: Fri, 10 Mar 2017 15:40:35 +0300 Subject: [PATCH] Add `--force-with-lease` for git push Let's make force-push safe --- plugins/git/git.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 34942d38..7de8563f 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -149,7 +149,7 @@ compdef _git ggpur=git-checkout alias ggpull='git pull origin $(git_current_branch)' compdef _git ggpull=git-checkout -alias ggpush='git push origin $(git_current_branch)' +alias ggpush='git push origin $(git_current_branch) --force-with-lease' compdef _git ggpush=git-checkout alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'