Skip to content

Commit a78fc4a

Browse files
committed
Merge branch 'ph/push-doc-cas' into maint
* ph/push-doc-cas: git-push.txt: clean up force-with-lease wording
2 parents 2c97724 + fddfaf8 commit a78fc4a

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Documentation/git-push.txt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,8 @@ already exists on the remote side.
149149
Usually, "git push" refuses to update a remote ref that is
150150
not an ancestor of the local ref used to overwrite it.
151151
+
152-
This option bypasses the check, but instead requires that the
153-
current value of the ref to be the expected value. "git push"
154-
fails otherwise.
152+
This option overrides this restriction if the current value of the
153+
remote ref is the expected value. "git push" fails otherwise.
155154
+
156155
Imagine that you have to rebase what you have already published.
157156
You will have to bypass the "must fast-forward" rule in order to
@@ -163,15 +162,14 @@ commit, and blindly pushing with `--force` will lose her work.
163162
This option allows you to say that you expect the history you are
164163
updating is what you rebased and want to replace. If the remote ref
165164
still points at the commit you specified, you can be sure that no
166-
other people did anything to the ref (it is like taking a "lease" on
167-
the ref without explicitly locking it, and you update the ref while
168-
making sure that your earlier "lease" is still valid).
165+
other people did anything to the ref. It is like taking a "lease" on
166+
the ref without explicitly locking it, and the remote ref is updated
167+
only if the "lease" is still valid.
169168
+
170169
`--force-with-lease` alone, without specifying the details, will protect
171170
all remote refs that are going to be updated by requiring their
172171
current value to be the same as the remote-tracking branch we have
173-
for them, unless specified with a `--force-with-lease=<refname>:<expect>`
174-
option that explicitly states what the expected value is.
172+
for them.
175173
+
176174
`--force-with-lease=<refname>`, without specifying the expected value, will
177175
protect the named ref (alone), if it is going to be updated, by

0 commit comments

Comments
 (0)