Github windows: Commit failed: Failed to create a new commit

前端 未结 22 1150
囚心锁ツ
囚心锁ツ 2021-01-29 23:48

I have: http://windows.github.com/

My current project has around 20k files, around 150MB (and not speaking about how slow it is and I cannot do a thing now) it doesn\'t

相关标签:
22条回答
  • 2021-01-30 00:33

    Just delete 'index.lock' in the '/.git/' directory. Solved the problem for me instantly.

    0 讨论(0)
  • 2021-01-30 00:34

    I checked the log file at C:\Users{user}\AppData\Local\GitHub\TheLog.txt and found this error:

    LibGit2Sharp.LibGit2SharpException:
    
    Could not open 'SomePath\SomeProject.opensdf':
    
    The process cannot access the file because it is being used by another process.
    

    I closed Visual Studio and the commit was then created successfully. n.b. I removed actual file path in the above error.

    0 讨论(0)
  • 2021-01-30 00:35

    just try to commit a few from your updates. 5 for example. and then make another commit with all other updates.

    0 讨论(0)
  • 2021-01-30 00:39

    I had this issue with the git windows desktop commit tool. I was getting this often and I figured out that Visual Studios was locking the files. To get around this issue I simply closed visual studio and the commit / sync worked fine.

    0 讨论(0)
  • 2021-01-30 00:40

    You can manually navigate to index.lock which is found inside the hidden .git folder of your repository location. Once you delete index.lock you will be able to commit as per usual.

    The easiest way to navigate to the folder will be to click on the folder breadcrumbs inside windows explorer and add \.git and press enter.

    0 讨论(0)
  • 2021-01-30 00:40

    I REBOOTED my Windows 7 machine and tried again - IT WORKED!

    I had the "Commit failed: Failed to create a new commit" and tried to delete the index or index.lock file via windows command prompt and that didn't work. I deleted it via windows explorer, that didn't work.

    I tried to check credentials like another reply in this list said, but couldn't figure it out and the credentials seemed 'ok.' So - I rebooted. Viola.

    I'm not sure this will help anyone, I'm not all that great w/ this stuff, but trying.

    0 讨论(0)
提交回复
热议问题