File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -403,12 +403,17 @@ fail with an error that looks like ::
403403 hint: See the 'Note about fast-forwards' in 'git push --help' for details.
404404
405405If this push had succeed then the commits ``A ``, ``B ``, and ``C `` would no
406- longer be referenced by any branch and be discarded. By default ``git push ``
407- helpfully tries to protect you from accidentally discarding commits by
408- rejecting the push to the remote. When this happens, GitHub also adds the
409- helpful suggestion to pull the remote changes and then try pushing again. In
410- some cases, such as if you and a colleague are both committing and pushing to
411- the same branch, this is a correct course of action.
406+ longer be referenced by any branch and be discarded:
407+
408+ .. code-block :: none
409+
410+ D---A'---E cool-feature, origin/cool-feature
411+
412+ By default ``git push `` helpfully tries to protect you from accidentally
413+ discarding commits by rejecting the push to the remote. When this happens,
414+ GitHub also adds the helpful suggestion to pull the remote changes and then try
415+ pushing again. In some cases, such as if you and a colleague are both
416+ committing and pushing to the same branch, this is a correct course of action.
412417
413418However, in the case of having intentionally re-written history we *want * to
414419discard the commits on the remote and replace them with the new-and-improved
You can’t perform that action at this time.
0 commit comments