From 66ec2011459b61688353bd33a75605d823ae65d4 Mon Sep 17 00:00:00 2001 From: Ezinwa Okpoechi Date: Thu, 18 Oct 2018 18:55:30 +0200 Subject: [PATCH] Make gpf alias safer --- modules/git/README.md | 3 ++- modules/git/init.zsh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/git/README.md b/modules/git/README.md index c0f3232..4d0ef6d 100644 --- a/modules/git/README.md +++ b/modules/git/README.md @@ -118,7 +118,8 @@ Aliases ### Push * `gp` updates remote refs along with associated objects. - * `gpf` forces a push. + * `gpf` forces a push safely (see --force-with-lease). + * `gpF` forces a push. * `gpa` pushes all branches. * `gpA` pushes all branches and tags. * `gpt` pushes all tags. diff --git a/modules/git/init.zsh b/modules/git/init.zsh index 8d3072e..6141801 100644 --- a/modules/git/init.zsh +++ b/modules/git/init.zsh @@ -111,7 +111,8 @@ alias gmt='git mergetool' # Push (p) alias gp='git push' -alias gpf='git push --force' +alias gpf='git push --force-with-lease' +alias gpF='git push --force' alias gpa='git push --all' alias gpA='git push --all && git push --tags' alias gpt='git push --tags'