The screen freezes. Your git commit hangs, and the Linux terminal blinks back like it knows something you don’t. You hit Ctrl+C. The session dies. The repository is now in a half-broken state that shouldn’t be possible—unless you’ve just run into the latest Git Linux terminal bug.
This bug has been surfacing in recent developer reports and issue trackers. It affects Git when run in certain Linux environments, often linked to interactive terminal handling or process interruption. It may appear after upgrading Git, modifying shell configuration, or changing environment variables like TERM or PAGER. The result: partial commits, corrupted .git/index.lock files, and orphaned processes consuming CPU cycles.
Reproduction steps vary, but common triggers include:
- Running
git commitorgit rebase -iwith custom editors in a broken$PATH. - Interrupting a Git process that spawns a pager or editor in a pseudo-TTY.
- Using Git over SSH in restricted shells.
When the bug hits, you can’t always just re-run the command. The lock file will block further operations. Run:
rm -f .git/index.lock
Then inspect the repository state. For safety: