Get MERGE_HEAD in pre-merge-commit hook

Viewed 32

In pre-merge-commit, I need the hash of the merge head to verify a few things about the commits that are about to be merged to the current branch.

However, it seems that neither the reference MERGE_HEAD nor the file .git/MERGE_HEAD exist at the time when the hook is running.

How can I get the merge head revision in my hook?

0 Answers
Related