@@ -157,9 +157,8 @@ already exists on the remote side.
157
157
Usually, "git push" refuses to update a remote ref that is
158
158
not an ancestor of the local ref used to overwrite it.
159
159
+
160
- This option bypasses the check, but instead requires that the
161
- current value of the ref to be the expected value. "git push"
162
- fails otherwise.
160
+ This option overrides this restriction if the current value of the
161
+ remote ref is the expected value. "git push" fails otherwise.
163
162
+
164
163
Imagine that you have to rebase what you have already published.
165
164
You will have to bypass the "must fast-forward" rule in order to
@@ -171,15 +170,14 @@ commit, and blindly pushing with `--force` will lose her work.
171
170
This option allows you to say that you expect the history you are
172
171
updating is what you rebased and want to replace. If the remote ref
173
172
still points at the commit you specified, you can be sure that no
174
- other people did anything to the ref (it is like taking a "lease" on
175
- the ref without explicitly locking it, and you update the ref while
176
- making sure that your earlier "lease" is still valid) .
173
+ other people did anything to the ref. It is like taking a "lease" on
174
+ the ref without explicitly locking it, and the remote ref is updated
175
+ only if the "lease" is still valid.
177
176
+
178
177
`--force-with-lease` alone, without specifying the details, will protect
179
178
all remote refs that are going to be updated by requiring their
180
179
current value to be the same as the remote-tracking branch we have
181
- for them, unless specified with a `--force-with-lease=<refname>:<expect>`
182
- option that explicitly states what the expected value is.
180
+ for them.
183
181
+
184
182
`--force-with-lease=<refname>`, without specifying the expected value, will
185
183
protect the named ref (alone), if it is going to be updated, by
0 commit comments