Home > other >  Am unable to "Git Commit" my project onto my Github
Am unable to "Git Commit" my project onto my Github

Time:07-17

I have tried several times to push my work into my github repo but after hitting git commit -m "message" i keep getting error message attached below:

$ C:\project\node_modules\.bin\commitlint --edit
⧗   input: chore: add commitlint on commit-msg
✖   Please add rules to your `commitlint.config.js`
    - Getting started guide: https://commitlint.js.org/#/?id=getting-started
    - Example config: https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-conventional/index.js [empty-rules]

✖   found 1 problems, 0 warnings
ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
husky - commit-msg hook exited with code 1 (error)

Screenshot

CodePudding user response:

Remove the commitlint node package from package.json or the dependent and rerun install or add a commitlint.config.js to the base of your project as the error message says and copy the example config or however you want it

the package has a hook and makes it so your commit message has to have a format but you haven’t configured it

CodePudding user response:

This git repository has a githook setup. In this case before a commit is committed some checks are performed if commit fulfill some requirement.

So please visit:

Apparently you commit message do not meet requirements. Fix commit message as specified here.

  • Related