You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Running uv cz dump or uv cz changelog raises NotAGitProjectError in git bash on Windows 11 #1497
I'm running git bash version 2.43.0.windows.1 on Windows 11.
My Python project uses uv, so I installed commitizen as recommended in the documentation with: us install commitizen.
I use pyproject.toml so uv run cz init correctly detected the project settings.
I'm able to run the commands info, ls, example, schema, and version.
All other commands commit, bump, and changelog fail.
Steps to reproduce
Run: uv run cz commit --dry-run or
Run: uv run cz bump --dry-run or
Run uv run cz changelog --dry-run
Current behavior
All three commands fail with:
fatal: not a git repository (or any of the parent directories): .git
With --debug this is the traceback:
Traceback (most recent call last):
File "C:\Users<user-omitted>\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users<user-omitted>\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\users<user-omitted>.local\bin\cz.exe_main.py", line 10, in
File "C:\Users<user-omitted>\AppData\Roaming\uv\tools\commitizen\lib\site-packages\commitizen\cli.py", line 660, in main
args.func(conf, arguments)()
File "C:\Users<user-omitted>\AppData\Roaming\uv\tools\commitizen\lib\site-packages\commitizen\commands\commit.py", line 34, in init
raise NotAGitProjectError()
commitizen.exceptions.NotAGitProjectError: fatal: not a git repository (or any of the parent directories): .git
If I run the command: git rev-parse --is-inside-work-tree in the same directory as the above commands, I correctly get true.
Desired behavior
Obviously, I expect that the failing cz commands work as intended when run in my environment.
Screenshots
No response
Environment
Commitizen Version: 4.8.2
Python Version: 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
Operating System: Windows
Triage from #1964: Still valid as far as I can tell. commitizen/git.py (lines 314-316) checks git rev-parse --is-inside-work-tree's output against the literal string "true" — and depending on subprocess setup with uv tool install on git-bash for Windows, that may not match exactly. Could you share cz --debug commit output and confirm if the issue persists on 4.15.1?
Activity
bearomorphism commentedon May 9, 2026
Triage from #1964: Still valid as far as I can tell.
commitizen/git.py(lines 314-316) checksgit rev-parse --is-inside-work-tree's output against the literal string"true"— and depending on subprocess setup withuv tool installon git-bash for Windows, that may not match exactly. Could you sharecz --debug commitoutput and confirm if the issue persists on 4.15.1?fix(git): tolerate noisy `git rev-parse` output in is_git_project
giant0791 commentedon Oct 3, 2026
OK, I'll test and let you know. Thanks!