Title: pre-commit hook for commitizen-branch broken since 4.15.1 · Issue #2003 · commitizen-tools/commitizen · GitHub
Open Graph Title: pre-commit hook for commitizen-branch broken since 4.15.1 · Issue #2003 · commitizen-tools/commitizen
X Title: pre-commit hook for commitizen-branch broken since 4.15.1 · Issue #2003 · commitizen-tools/commitizen
Description: Description I can't upgrade my pre-commit hooks from 4.15.0 to 4.15.1 since it would break commitizen-branch. The error message is: commitizen check branch..................................................Failed - hook id: commitizen-bra...
Open Graph Description: Description I can't upgrade my pre-commit hooks from 4.15.0 to 4.15.1 since it would break commitizen-branch. The error message is: commitizen check branch.............................................
X Description: Description I can't upgrade my pre-commit hooks from 4.15.0 to 4.15.1 since it would break commitizen-branch. The error message is: commitizen check branch.........................................
Opengraph URL: https://github.com/commitizen-tools/commitizen/issues/2003
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pre-commit hook for commitizen-branch broken since 4.15.1","articleBody":"### Description\n\nI can't upgrade my pre-commit hooks from 4.15.0 to 4.15.1 since it would break commitizen-branch.\n\nThe error message is:\n```TEXT\ncommitizen check branch..................................................Failed\n- hook id: commitizen-branch\n- exit code: 23\n\nfatal: ambiguous argument '$PRE_COMMIT_FROM_REF..$PRE_COMMIT_TO_REF': unknown revision or path not in the working tree.\nUse '--' to separate paths from revisions, like this:\n'git \u003ccommand\u003e [\u003crevision\u003e...] -- [\u003cfile\u003e...]'\n```\n\n```TEXT\ndefault_install_hook_types:\n - pre-commit\n - pre-push\n\nrepos:\n - repo: https://github.com/commitizen-tools/commitizen\n rev: v4.15.0\n hooks:\n - id: commitizen-branch\n stages:\n - pre-push\n - \n```\n\n### Steps to reproduce\n\n1. Create branch and make a dummy change\n2. Use above configuration\n 1. git add \u0026\u0026 git commit (works)\n 2. git push (works)\n3. Create a new commit, update to any newer version (4.15.1 / 4.16.0 / 4.16.1 / 4.16.2)\n 1. git add \u0026\u0026 git commit (works)\n 2. git push (fails)\n\n### Current behavior\n\nAny version newer than 4.15.0 fails with an error.\n\nConfiguration:\n\n```TEXT\nrepos:\n - repo: https://github.com/commitizen-tools/commitizen\n # can be any of: 4.15.1, 4.16.0, 4.16.1, 4.16.2\n rev: v4.15.1\n hooks:\n - id: commitizen-branch\n stages:\n - pre-push\n```\n\nError:\n\n```TEXT\ncommitizen check branch..................................................Failed\n- hook id: commitizen-branch\n- exit code: 23\n\nfatal: ambiguous argument '$PRE_COMMIT_FROM_REF..$PRE_COMMIT_TO_REF': unknown revision or path not in the working tree.\nUse '--' to separate paths from revisions, like this:\n'git \u003ccommand\u003e [\u003crevision\u003e...] -- [\u003cfile\u003e...]'\n```\n\n\n### Desired behavior\n\nI can update commitizen-branch to use the most recent version (4.16.2).\n\n### Screenshots\n\n\u003cimg width=\"1804\" height=\"287\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/503896c2-e650-4830-8b43-1d05a2b3eff1\" /\u003e\n\n### Environment\n\nNo output for `cz version --report` since I don't have cz installed.\nCommitizen is managed by the pre-commit hook.\n\npre-commit version in case it's relevant: 4.6.0","author":{"url":"https://github.com/Thomas-Neumann","@type":"Person","name":"Thomas-Neumann"},"datePublished":"2026-05-26T13:37:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/2003/commitizen/issues/2003"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:64aad291-3f4d-666a-d8b3-ca106f85f690 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E92E:3C1583:9FFCF1:A3C9D7:6A4DB473 |
| html-safe-nonce | 03ac9fec58e692230b8d4affa32c98ea50c5d3db48ab7e1cb185c68ef8320979 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTJFOjNDMTU4Mzo5RkZDRjE6QTNDOUQ3OjZBNERCNDczIiwidmlzaXRvcl9pZCI6IjI1NDM1NTk3NDQyMDQ2ODIzNTUiLCJyZWdpb25fZWRnZSI6InNlYSIsInJlZ2lvbl9yZW5kZXIiOiJzZWEifQ== |
| visitor-hmac | a56422d2fa577c59904b6b5667e7528f38292332d22792385e4eb44a4575f6b9 |
| hovercard-subject-tag | issue:4524563125 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/commitizen-tools/commitizen/2003/issue_layout |
| twitter:image | https://opengraph.githubassets.com/00fb3b9258b86c7b11d849e6b639f5538cb50548ee823583d6d1acdeab617f00/commitizen-tools/commitizen/issues/2003 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/00fb3b9258b86c7b11d849e6b639f5538cb50548ee823583d6d1acdeab617f00/commitizen-tools/commitizen/issues/2003 |
| og:image:alt | Description I can't upgrade my pre-commit hooks from 4.15.0 to 4.15.1 since it would break commitizen-branch. The error message is: commitizen check branch............................................. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Thomas-Neumann |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git |
| octolytics-dimension-user_id | 62252524 |
| octolytics-dimension-user_login | commitizen-tools |
| octolytics-dimension-repository_id | 106127589 |
| octolytics-dimension-repository_nwo | commitizen-tools/commitizen |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 106127589 |
| octolytics-dimension-repository_network_root_nwo | commitizen-tools/commitizen |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 32f7b614aca06e6bbd89842b1370df1328264f68 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width