This may be an old reply but I'm hoping this is more useful on next who need this solution.
On linux/unix/gitbash/cygwin, try
rm -f .git/index.lock
On Windows Command Prompt, try:
del .git\index.lock
For Windows:
> rm -Force ./.git/index.lock
> taskkill /F /IM git.exe SUCCESS: The process "git.exe" with PID 20448 has been terminated. SUCCESS: The process "git.exe" with PID 11312 has been terminated. SUCCESS: The process "git.exe" with PID 23868 has been terminated. SUCCESS: The process "git.exe" with PID 27496 has been terminated. SUCCESS: The process "git.exe" with PID 33480 has been terminated. SUCCESS: The process "git.exe" with PID 28036 has been terminated. > rm -Force ./.git/index.lock
On a Windows platform running Visual Studio 2015 RC (v4.6.00057) in combination with SourceTree (v1.6.14.0) will give this error as well.
Solution: Assuming you want to use source tree as source code manager, simply disable the source control provider inside Visual Studio like this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With