fatal: Unable to create '.git/index.lock': File exists. Another git process seems to be running in this repository
A lock file from another (or crashed) Git process blocks this command.
Seen on:
Git
Meaning
Git creates index.lock while modifying the index. IDEs, file watchers or a crashed command can leave it behind.
Common causes
- Another git command or IDE running
- A previous git process crashed
⚡ Quick fix
- Wait for other git processes to finish
- If none are running, delete .git/index.lock
Detailed fix by platform
Git
- bash
ps aux | grep -i git rm -f .git/index.lock
How to diagnose
- Process — Any git/IDE process running?
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026