check branch is rebased before pushing hook code example Example: git hooks chmod +x prepare-commit-msg