How to save old commit message after failed capture

When I add the commit-msg hook that will exit with 1 to indicate some error, the original git commit msg is empty / not used when I run git commit again.

Is there a way to keep the old commit message, so I don’t need to enter the whole message again, but just edit the old commit message?

+6
source share

All Articles