summaryrefslogtreecommitdiff
path: root/Documentation/config
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-10-27 22:09:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-27 22:09:49 (GMT)
commitde0a7effc86aadf6177fdcea52b5ae24c7a85911 (patch)
tree4c542ec9c7c2b29ad2d1c1329602bc47dc40c4c5 /Documentation/config
parent52b8c8c7165987650bf873b878f20b14c33b268f (diff)
parent3b5bf96573b5773e64f7884607794c268b352992 (diff)
downloadgit-de0a7effc86aadf6177fdcea52b5ae24c7a85911.zip
git-de0a7effc86aadf6177fdcea52b5ae24c7a85911.tar.gz
git-de0a7effc86aadf6177fdcea52b5ae24c7a85911.tar.bz2
Merge branch 'sk/force-if-includes'
"git push --force-with-lease[=<ref>]" can easily be misused to lose commits unless the user takes good care of their own "git fetch". A new option "--force-if-includes" attempts to ensure that what is being force-pushed was created after examining the commit at the tip of the remote ref that is about to be force-replaced. * sk/force-if-includes: t, doc: update tests, reference for "--force-if-includes" push: parse and set flag for "--force-if-includes" push: add reflog check for "--force-if-includes"
Diffstat (limited to 'Documentation/config')
-rw-r--r--Documentation/config/advice.txt9
-rw-r--r--Documentation/config/push.txt6
2 files changed, 12 insertions, 3 deletions
diff --git a/Documentation/config/advice.txt b/Documentation/config/advice.txt
index bdd37c3..acbd0c0 100644
--- a/Documentation/config/advice.txt
+++ b/Documentation/config/advice.txt
@@ -10,9 +10,8 @@ advice.*::
that the check is disabled.
pushUpdateRejected::
Set this variable to 'false' if you want to disable
- 'pushNonFFCurrent',
- 'pushNonFFMatching', 'pushAlreadyExists',
- 'pushFetchFirst', and 'pushNeedsForce'
+ 'pushNonFFCurrent', 'pushNonFFMatching', 'pushAlreadyExists',
+ 'pushFetchFirst', 'pushNeedsForce', and 'pushRefNeedsUpdate'
simultaneously.
pushNonFFCurrent::
Advice shown when linkgit:git-push[1] fails due to a
@@ -41,6 +40,10 @@ advice.*::
we can still suggest that the user push to either
refs/heads/* or refs/tags/* based on the type of the
source object.
+ pushRefNeedsUpdate::
+ Shown when linkgit:git-push[1] rejects a forced update of
+ a branch when its remote-tracking ref has updates that we
+ do not have locally.
statusAheadBehind::
Shown when linkgit:git-status[1] computes the ahead/behind
counts for a local ref compared to its remote tracking ref,
diff --git a/Documentation/config/push.txt b/Documentation/config/push.txt
index f5e5b38..21b256e 100644
--- a/Documentation/config/push.txt
+++ b/Documentation/config/push.txt
@@ -114,3 +114,9 @@ push.recurseSubmodules::
specifying '--recurse-submodules=check|on-demand|no'.
If not set, 'no' is used by default, unless 'submodule.recurse' is
set (in which case a 'true' value means 'on-demand').
+
+push.useForceIfIncludes::
+ If set to "true", it is equivalent to specifying
+ `--force-if-includes` as an option to linkgit:git-push[1]
+ in the command line. Adding `--no-force-if-includes` at the
+ time of push overrides this configuration setting.