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: redirect.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:79cc24b0-2b65-b366-b1b6-cf5478358df1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9A96:AF0A5:1259CCE:18F77BA:6A4D6D1D |
| html-safe-nonce | 2e4f3fe02e9edd400fb493f61c0517160a798105812aa11bae760fbcdaf55257 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTk2OkFGMEE1OjEyNTlDQ0U6MThGNzdCQTo2QTRENkQxRCIsInZpc2l0b3JfaWQiOiI4NzkxODcxNDQ5MDk2NjEzMTQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3f8245ac5bab1064c5b4c8493ef9e4f908f5a1b0f098c0600e06832982e00a5d |
| 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 | 7db3950e3f59095e20a9789440c3dd554efc62d434882ead06ae05b5815605b9 |
| 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 | cd8f6a71db61d6012a0cbb134be844fdbe9b8a45 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width