I've recently started using commitizen in my day-to-day development, however I don't understand why I get the following error with the first commit to a new branch, ie:
...on current main branch...
git checkout -b fix/my-new-branch
...make some changes...
git commit -am "fix: did the thing"
commitizen check.........................................................Passed
commitizen check branch..................................................Failed
- hook id: commitizen-branch
- exit code: 3
No commit found with range: 'origin/HEAD..HEAD'
My pre-commit file looks like this:
---
repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.37.1
hooks:
- id: commitizen
- id: commitizen-branch
stages: [commit-msg]
Is there something I'm missing here?
- My git remote is setup:
origin git@github.com:myuser/my_repo.git (fetch)
origin git@github.com:myuser/my_repo.git (push)
- Git branch shows:
fix/my-new-branch
* main