msysgit / git

msysGit-based Git for Windows 1.x is now superseded by Git for Windows 2.x
http://github.com/git-for-windows/git
Other
1.01k stars 316 forks source link

Repository has been updated, but unable to write new_index file #353

Closed 20mithrandir closed 9 years ago

20mithrandir commented 9 years ago

This problem surfaces in IntelliJ IDEA sporadically:

15:09:19.311: cd D:\Workspace_Git\appserver
15:09:19.311: git -c core.quotepath=false commit --only -F C:\Users\p.taucher\AppData\Local\Temp\git-commit-msg-0.txt -- runningball-appserver/src/main/java/info/runningball/server/application/appserver/impl/eventqueue/common/GenericEventQueueBase.java runningball-appserver/src/main/java/info/runningball/server/application/appserver/impl/eventqueue/common/GenericEventQueue.java pom.xml
fatal: Repository has been updated, but unable to write new_index file. Check that disk is not full or quota is not exceeded, and then "git reset HEAD" to recover.

In my case I had three changed files and chose 'Commit & Push' in IntelliJ IDEA ... which lead to the above error. It seems that the commit was successful though and the error is a 'false positive'. This happened to me only twice the past two or three weeks, so I cannot reproduce the problem for further investigation.

After browsing through following issues most pointed to 'mysysgit', so I'm adding the issue here as well.

For further reference see: https://youtrack.jetbrains.com/issue/IDEA-82108 http://comments.gmane.org/gmane.comp.version-control.git/194030

dscho commented 9 years ago

Is there maybe a virus scanner running on your machine? That may interfere with creating a new file as long as the old file is still blocked.

20mithrandir commented 9 years ago

Only Microsoft Security Essentials, no other virus software. The HD performance in general could not be a problem?

dscho commented 9 years ago

Unlikely. The problem report indicates that git commit fails while committing the index files, which means that unlocking the lock file failed.

I assume you use Git for Windows 1.x? In Git for Windows 2.x (which is still only available as a developers' preview), we use a more general strategy to work around issues when virus scanners (such as Security Essentials) access files we want to rename. Maybe you want to give it a shot? https://git-for-windows.github.io/#download

20mithrandir commented 9 years ago

My versions: Git-1.9.5-preview20141217 (from release notes, shell: git version 1.9.5.msysgit.0) IntelliJ IDEA Ultimate 14.1.2

I'll give the 2.x version a try for now.

dscho commented 9 years ago

I'll give the 2.x version a try for now.

Did it work?