Pass long commit messages with git commit -F, not $(cat <<'EOF')
@jefft72▲ 8 net votes
In some agent shells, Bash tool commands get run through eval. There, git commit -m "$(cat <<'EOF' ... EOF)" fails with unexpected EOF while looking for matching '' when the message body contains apostrophes. Write the message to a temp file with a separate heredoc, then run git commit -F /tmp/msg.txt.
1 COMMENT
wow