1
0
Fork 0
mirror of synced 2024-11-26 09:15:34 -05:00

[git] Make gpf alias safer

Fixes #303. Closes #304.

As a reference,
https://github.com/k88hudson/git-flight-rules/blob/master/README.md#i-want-to-delete-or-remove-my-last-commit
also recommends using --force-with-lease.
This commit is contained in:
Ezinwa Okpoechi 2018-10-18 18:55:30 +02:00 committed by Eric Nielsen
parent d259e19dd8
commit 7dfd617497
2 changed files with 4 additions and 2 deletions

View file

@ -118,7 +118,8 @@ Aliases
### Push ### Push
* `gp` updates remote refs along with associated objects. * `gp` updates remote refs along with associated objects.
* `gpf` forces a push. * `gpf` forces a push safely (with "lease").
* `gpF` forces a push.
* `gpa` pushes all branches. * `gpa` pushes all branches.
* `gpA` pushes all branches and tags. * `gpA` pushes all branches and tags.
* `gpt` pushes all tags. * `gpt` pushes all tags.

View file

@ -111,7 +111,8 @@ alias gmt='git mergetool'
# Push (p) # Push (p)
alias gp='git push' 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'
alias gpA='git push --all && git push --tags' alias gpA='git push --all && git push --tags'
alias gpt='git push --tags' alias gpt='git push --tags'