Git Commit Message in Environment Variable

Maybe it’s too much trouble, but this worked for me:

echo "export COMMIT_MESSAGE=\"$(git log --format=oneline -n 1 $CIRCLE_SHA1)\"" >> ~/.bashrc

3 Likes