describes how you can end up in this state without a force push.
describes how you can end up in this state without a force push. Another cause can be a misconfigured [server hook](../server_hooks.md) that changes a HEAD ref via a `git reset` operation.
If you look at the output from the sample code below for the target branch, you
If you look at the output from the sample code below for the target branch, you
see a discontinuity in the from/to commits as you step through the output. Each new
see a discontinuity in the from/to commits as you step through the output. The `commit_from` of each new push should equal the `commit_to` of the previous push. A break in that sequence indicates one or more commits have been "lost" from the repository history.
push should be "from" the "to" SHA of the previous push. When this discontinuity happens,
you see two pushes with the same "from" SHA:
The following example checks the last 100 pushes and prints the `commit_from` and `commit_to` entries: