Hello,
I’ve got this simple prepare-commit-msg
script to add the name of the branch to my commit message:
#!/bin/bash
COMMIT_MSG_FILE=$1
branch=$(git rev-parse --symbolic --abbrev-ref HEAD)
sed -i "1 s@^@${branch}: @" $1;
If I do git commit
or git commit -m "mycommitmessage"
from the cli it works.
If I try to commit from SM it fails with this message :
Any clue about this?