'git' is not recognized
Git is not installed or not in the PATH, so commands like git clone or update scripts fail.
The message
'git' is not recognized as an internal or external command, operable program or batch file. (PowerShell: The term 'git' is not recognized as the name of a cmdlet …; deutsch: Der Befehl "git" ist entweder falsch geschrieben oder konnte nicht gefunden werden.)
Affects: Git for Windows, ComfyUI, AUTOMATIC1111 Stable Diffusion WebUI, Stable Diffusion WebUI Forge, TextGen (text-generation-webui), llama.cpp
Why is this happening?
Many AI programs are installed with git clone and updated with git pull; install scripts and custom nodes also call Git. Git is not preinstalled on Windows. If you installed it but chose the PATH option “Use Git from Git Bash only” in the installer, CMD and PowerShell won’t find it.
How to fix it
- Install Git for Windows from the official site git-scm.com/install/windows (x64 Setup) or in the terminal with
winget install --id Git.Git -e --source winget. - In the installer on the “Adjusting your PATH environment” page, leave the recommended option “Git from the command line and also from 3rd-party software” selected.
- Close all open terminals and the AI program launcher, reopen them, and test with
git --version. - If you already installed Git with “Use Git from Git Bash only,” run the installer again and choose the recommended PATH option.
Better not: Do not download Git from third-party download portals; use only git-scm.com, the GitHub releases for git-for-windows, or winget.
Set up from scratch again
If it still doesn’t work after that, a fresh setup step by step often helps:
- Set up and maintain ComfyUI on Windows
Desktop or Portable, where the models belong, sharing models with other programs, safely installing custom nodes, updates, startup options … - Your First Image with ComfyUI
Install Comfy Desktop, learn the interface, and create your first AI image with FLUX.2 [small] 4B or Z-Image Turbo. - Your First AI Video with LTX in ComfyUI
Use LTX-2.3 in ComfyUI to create short videos with sound from text or an image. Template, files, settings, and license.
Terms for this
Similar errors
- Path too long: Filename too long / Windows Long Path support
- 'python' is not recognized or opens the Microsoft Store
- ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied – pip cannot modify a file
- ImportError: DLL load failed while importing …: The specified module could not be found – a Python package is missing a Windows DLL
- No matching distribution found for torch (wrong Python version)
Sources
- https://git-scm.com/install/windows
- https://github.com/git-for-windows/build-extra/blob/main/installer/install.iss
Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.