Error in commiting to git saying stCommitMsg file not found

When you run git commit, Git will read from the configure variable commit.template to find a commit message template and load it into your editor for you to write your commit message.

Regarding your error, it seems that Git is trying to find the template file /Users/<username>/.stCommitMsg – but it does not exist.

Check your configuration with:

git config --get commit.template

Double-check that your username is correct. If the file does not exist, you can create it with:

touch /Users/<username>/.stCommitMsg

Alternatively, you can edit ~/.gitconfig and delete the commit.template item:

[commit]                                                                        
        template = /Users/<username>/.stCommitMsg

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)