Add git pf
alias
Using `--force-with-lease` allows one to force push without the risk of unintentionally overwriting someone else's work. The git-push(1) man page states: > Usually, "git push" refuses to update a remote ref that is not an > ancestor of the local ref used to overwrite it. > > This option overrides this restriction if the current value of the > remote ref is the expected value. "git push" fails otherwise. > > --force-with-lease alone, without specifying the details, will protect > all remote refs that are going to be updated by requiring their > current value to be the same as the remote-tracking branch we have for > them. > > --@calleerlandsson > -- https://github.com/thoughtbot/guides/pull/363
This commit is contained in:
parent
8441455538
commit
7733711c3b
1 changed files with 1 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
||||||
branches = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)\t%(color:red)%(authorname)\t%(color:white)%(color:bold)%(refname:short)\" refs/remotes
|
branches = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)\t%(color:red)%(authorname)\t%(color:white)%(color:bold)%(refname:short)\" refs/remotes
|
||||||
ci = commit -v
|
ci = commit -v
|
||||||
co = checkout
|
co = checkout
|
||||||
|
pf = push --force-with-lease
|
||||||
st = status
|
st = status
|
||||||
[core]
|
[core]
|
||||||
excludesfile = ~/.gitignore
|
excludesfile = ~/.gitignore
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue