Open
Description
Description
Whenever I try to push a commit to the origin (git push -u origin main
), an error is preventing me from pushing:
commitizen check branch..................................................Failed
- hook id: commitizen-branch
- exit code: 23
fatal: ambiguous argument 'origin/HEAD..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
error: failed to push some refs to 'https://github.com/<some repo>.git'
Steps to reproduce
- Run
cz init
. - Run
pre-commit install --hook-type commit-msg --hook-type pre-push
- Run
git init && git add . && git commit -m "feat: my new commit"
- Run
git remote add origin https://github.com/<some repo>.git
- Run
git push -u origin main
Current behavior
I should be able to push it correctly to origin.
Desired behavior
I want to push it to origin.
Screenshots
No response
Environment
Commitizen Version: 2.42.1
Python Version: 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110]
Operating System: Linux