What git bindings apply to 'git rebase -continue'?

I am trying to create a set of git hook scripts for my organization, and one of them that I would like to use (for several projects only for myself) would have to check git rebase --continue that I do not have any conflicts markers in my code ( <<<<< , ===== or >>>>> ).

I already have a script for my rebase --continue , but what does the script apply to rebase --continue ?

+7
git githooks
source share
1 answer

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

There is a "post-rewrite" hook that is "called by commands that overwrite", such as git rebase . However, it only starts after the command is executed (i.e., when the redirect is completed).

It will provide you with a list of new commits created by rewriting, so you can check to see if there are any conflict markers committing and complain, but at this point it is too late to cancel rebase. You can still return rebase using reflog, of course.

In general, it may be easier to write some shell for git rebase or a separate verification tool for calling manually. In any case, you should (IMHO) always review your changes before calling git rebase --continue . If you adhere to this, you will not have accidentally marked conflict markers.

+3
source share

All Articles