MergeVerify Hook

After a git merge, the MergeVerify hook reports conflicts the merge left behind. It checks two things: files Git still lists as unresolved (unmerged) - in code files together with the conflict markers and line numbers - and markers a merge commit newly introduces because the conflict was not resolved but committed with the markers. Since v6.9.6 it also checks staged files after git merge --no-commit or --squash and a squash commit that follows in the same command. On a finding the hook exits with code 2 and the agent sees the message.

Marker lines in clean or previously committed files (for example test fixtures) trigger nothing. If a command contains several merges in different directories, such as a loop over several worktrees, every directory is checked.

Why it matters

Forgotten merge markers are a common source of errors - especially when agents merge automatically. MergeVerify makes unresolved conflicts and conflicts committed with markers visible immediately, before anything is built on top of them.

Full documentation included with purchase

The detailed configuration reference, troubleshooting guide, and hook documentation are included as PDF in the download.

Buy now →