diff --git a/common/git-hooks/post-merge b/common/git-hooks/post-merge new file mode 100644 index 00000000..1615d5bf --- /dev/null +++ b/common/git-hooks/post-merge @@ -0,0 +1,13 @@ +#!/bin/bash + +# Check if the merge was successful +if [ "$1" -eq 0 ]; then + # Iterate through the new commits + for commit in $(git log HEAD@{1}..HEAD --oneline | cut -d ' ' -f 1); do + # Get the commit hash and message + commit_msg=$(git log --format=%B -n 1 $commit) + + # Print the commit hash and message + echo "$commit $commit_msg" + done +fi