Shell
#!/bin/bash
# Post-Commit Hook: Confirmation Feedback
# Provides clear feedback after successful commits
# Get the last commit message
COMMIT_MSG=$(git log -1 --pretty=%B)
# Extract first line for concise output
FIRST_LINE=$(echo "$COMMIT_MSG" | head -n 1)
echo ""
echo "β
Migration committed successfully!"
echo "π Commit: $FIRST_LINE"
echo ""
# Count total commits in this branch
BRANCH=$(git rev-parse --abbrev-ref HEAD)
COMMIT_COUNT=$(git rev-list --count HEAD ^main 2>/dev/null || echo "1")
echo "π Branch: $BRANCH"
echo "π Total commits in branch: $COMMIT_COUNT"
echo ""