I am using Windows. When staging files I get this error.
Updating the Git index failed. A rescan will be automatically started to resynchronize git-gui.
git config --global core.autocrlf false
Has always been my recommendation (see "Git 1.6.4 beta on Windows (msysgit) - Unix or DOS line termination").
However, in your case, you can "Continue", but this warning is there to mention the conversion of certain files might not be reversible:
If true, makes git check if converting CRLF is reversible when end-of-line conversion is active. Git will verify if a command modifies a file in the work tree either directly or indirectly. For example, committing a file followed by checking out the same file should yield the original file in the work tree. If this is not the case for the current setting of
core.autocrlf, git will reject the file.
The variable can be set to "warn", in which case git will only warn about an irreversible conversion but continue the operation.
If you don't want to see this warning, as explained in this thread, you can set
You could also stash your files through the tools menu of git gui, and add some options to those tools with, for instance, this git config file.
The interest is that, for each tool, you can add:
Don’t rescan the working directory for changes after the tool finishes execution.
Could you please elaborate a bit on Unlock Index
When we write out a new index file, first we create a new file
$GIT_DIR/index.lock, write the new contents into it, and rename it to the final destination
We try to create the
O_EXCLso that we can notice and fail when somebody else is already trying to update the index file.