Automatic un-linking when history is changed
When a (forced) push operation results in a move back in the history of a branch (removes commits from the current branch), the removal is detected and removed automatically if the removed commits are not part of another branch.
Similarly, when a (force) push operation results in a move back in the history of a branch and adds newer commits, the removal of some commits and addition of newer commits are detected. The corresponding links are severed and/or created, respectively.
This is supported only if post-receive, ref-updated hooks are used.
Note: You can use permission checks to restrict users from altering history. For more information,
see Defining Git-related permissions and preconditions.