I've run into this serious error while committing, and created a bug report.
I keep getting this error on TortoiseGit operations:
git did not exit cleanly (exit code 128)
I've reinstalled the program, rebooted, and tried to clone a fresh repo from github - nothing seems to work. I also deleted %appdata%\Tortoise git folder ... I'm at a loss now. Any advice on how to proceed?
It's probably because your SSH key has been compromised. Make a new one and add it to your GitHub account.
In my case a folder in my directory named as the git-repository on the server caused the failure.
I was having this same issue and I resolved it in the following way...
I have the NVIDIA "Tegra Android Development Pack" installed and it seems to also have a version of mysysgit.exe with it. TortoiseGit automatically found that installation location (instead of the standard git installation) and auto-populated it in the settings menu.
To correct this, go to: "Settings -> General" and there is a field for the path to mysysgit.exe. Make sure this is pointing to the correct installation.
on win7 64:
git-gui gives a good answer: a previous git has crashed and left a lock file. Manually remove. In my case, this was in .git/ref/heads/branchname.lock.
delete, and error 128 goes away. It surprises that tortoisegit doesn't give such an easy explanation.
An quick solution would be to create a new local directory for example c:\git_2014, In this directory rightklick and choose Git Clone
git-bash
reports fatal: Unable to create<Path to git repo>/.git/index.lock
: File exists.Deleting
index.lock
makes the error go away.