Open JamesBlack001 opened 8 years ago
This is something that can happen when you run multiple operations in parallel. Moving branches or updating the current branch wants to write to the reflog, so it needs to write to it. Unfortunately Windows does not generally like having the same file open at the same time with different intents.
It's clear whether git was used before or after everything else was tried. Do you have parallelism in your application or in your system in general? When you tried with git, had you stopped other operations on the system?
We do use parallelism. But we have a lock mechanism around our git operations, so only one thread can access git at a time.
When we used the git command it was after all other operations.
The file only seems to be locked when using libgit2sharp, and continues to be locked after a machine reboot.
Files can't stay locked in Windows between reboots, AFAIK. Have you used sysinternals process explorer to see what other process has a handle to that file?
You might want to check out "file unlocker", a pretty nifty tool for avoiding locked file issues on windows.
Have an issue with this error message: