snippets/old_snippets/git-force-push-with-lease.en.md

708 B

title date draft snippet_types
force push with --lease for safety 2020-06-10T10:06:23+02:00 false
git

Just found out, via tweet, from the insightful joshdholtz that there is a safer alternative to git push --force

Time to update my aliases:

alias gs="gst"
-alias gpf="gp --force"
+alias gpf="gp --force-with-lease"
alias gdc="gd --cached"

I use zsh shell's git plugin that is why you see "gst" for git status and "gp" for git push. Highly recommend it

Source: