Yesterday I created a git repository. My repository folder looks like:

I ran git add -A, after that I ran git status. As you can see, my file is staged successfully. However when i ran commit -m 'first commit'. It kept giving me this message:
And my staged file hadn't been commited. Some ideas would be appreciated.
CodePudding user response:
I believe you have installed a pre-commit hook that:
- prints
hello - exits nonzero, so as to prevent the commit.
That would produce the behavior you see. To fix it, remove or fix the pre-commit hook. Look at .git/hooks/ and check your configuration for a core.hooksPath setting:
git config --get core.hooksPath
If the latter produces output, check that directory for a pre-commit hook.
