Git Hooks Pre-rebase


Example

This hook is called before git rebase begins to alter code structure. This hook is typically used for making sure a rebase operation is appropriate.

This hook takes 2 parameters:

  1. the upstream branch that the series was forked from, and
  2. the branch being rebased (empty when rebasing the current branch).

You can abort the rebase operation by exiting with a non-zero status.