Error executing git command because stCommitMsg file was not found

While I am trying to make a commit in the local git branch, I got this error

fatal: could not read '/ Users / <username> /.stCommitMsg': There is no such file or directory

I can make use

git commit -m "commit message"

but i can't use

git commit

I am using macOS Sierra and git version 2.10.1 (Apple Git -78)

+4
source share
2 answers

At startup git commit, git will read from the configure commit.template variable to find the commit message template and load it into the editor so you can write the commit message.

, '/Users/<username>/.stCommitMsg. ~/.gitconfig, commit.template.

, git config --get commit.template

+10

Git git commit. loc '/Users/<username>/.stCommitMsg, ~/.gitconfig, .

+1

Source: https://habr.com/ru/post/1666578/


All Articles