What git hooks apply to 'git rebase –continue'?

I’m trying to build a set of git hook scripts for my organization, and one I would like to use (for multiple project just for myself) would be to check upon a git rebase --continue that I don’t have any conflicts markers leftover in my code (<<<<<, =====, or >>>>>).

I already have such a script for my pre-commit, but what script applies on a rebase --continue ?

  • Git production release
  • How can I 'git merge' a new file based on a tracked file of a different name?
  • what does subproject commit mean?
  • “git svn” command fails with error “git: 'svn' is not a git command. See 'git --help'.”
  • Git in terminal
  • Git “leaky” branches?
  • How to check if a commit has been merged to my current branch - somewhere in time?
  • How to import a local GIT/Maven project/folder into eclipse?
  • How to use Kaleidoscope 2 with Git Tower?
  • Why is Jenkins failing when fetching from git, while the command line isn't?
  • How to use SSH instead of HTTP for Git submodules?
  • “Not currently on any branch” after doing a commit
  • One Solution collect form web for “What git hooks apply to 'git rebase –continue'?”

    The manpage githooks has a list of the available git hooks.
    There is no hook for git rebase --continue (the list is exhaustive).

    There is a hook “post-rewrite”, which “is invoked by commands that rewrite commits”, such as git rebase. However, it only runs once the command is done (i.e. when the rebase is finished).

    It will give you the list of new commits created by the rewrite, so you could check if the commits introduce any conflicts markers and complain, but at that point it is too late to abort the rebase. You can still revert the rebase using the reflog, of course.

    All in all, it is probably easier to write some wrapper for git rebase, or a separate checking tool to invoke manually. At any rate, you should (IMHO) always review the changes you made before invoking git rebase --continue. If you stick to doing that, you will not accidentally have conflict markers checked in.

    Git Baby is a git and github fan, let's start git clone.