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 diff :: overriding .gitconfig external tool
  • How is git merge better than svn merge if you still have to go through the same steps?
  • What's the purpose of git-mv?
  • git error: inflate: data stream error (incorrect data check) after download was done
  • git how to clean a cloned repository and reclone
  • How to clone and run another user's Rails app
  • Git is ignoring files that aren't in gitignore
  • how can i use rugged to create and commit a file like from the command line?
  • Git Submodule - Permission Denied
  • git-svn - #object# doesn't exist in the repository at /opt/local/libexec/git-core/git-svn line 4706
  • git cherry pick from remote master branch without other remote changes
  • Git strategy for a project with many independent modules
  • 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.