add the old snippet md files

This commit is contained in:
Travis Shears 2025-06-05 16:20:57 +02:00
parent fc0dd204c7
commit bcf8313a4b
110 changed files with 3048 additions and 0 deletions

View file

@ -0,0 +1,26 @@
---
title: "force push with --lease for safety"
date: 2020-06-10T10:06:23+02:00
draft: false
snippet_types: ["git"]
---
Just found out, via [tweet](https://twitter.com/joshdholtz/status/1270578433563787264?s=19), from
the insightful [joshdholtz](https://twitter.com/joshdholtz) that there is a safer alternative to
`git push --force`
Time to update my aliases:
```diff
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:**
- [stackoverflow](https://stackoverflow.com/questions/52823692/git-push-force-with-lease-vs-force)