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

前端 未结 22 1148
囚心锁ツ
囚心锁ツ 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:51

    This happened to me. Try opening up PowerShell and manually committing each file using the "git add [file name]" command. To see which files have been added, enter "git status" into the command line. The green files have been added, the red ones have not been added.

    Once you've added them all, type "git commit." Then go back to Github for Windows and sync it up.

    I'm not sure what causes this issue, but once I followed the above steps, Github went back to its normal, awesome behavior.

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

    I had this problem too after an unexpected crash. I couldn't fix using the 'Open Shell' option as suggested. I had to open the Windows CLI (Start -> run -> cmd) and delete the index.lock file in my GitHub folder:

    cd \Users\myUser\my\local\github\repo
    cd .git
    del index.lock
    

    Then when I went back to the GitHub app, it committed successfully.


    Note that for some people, according to comments, the file to delete doesn't have the .lock extension, so the delete command could also be del index.

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

    This issue seems to be a bug in the github client - I get it "all the time" on the machine on which i only installed the github client. I Never saw it on the git + github PC (I have not used it for a few days now). Doing the "git add ." and then "git commit" worked for me also on the shell - but that is the thing the GUI should be doing not me - otherwise I can just stick to the git shell client.

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

    It happend to me when my project was opened in an IDE (Netbeans in my case), make sure non of the files you're about to commit isn't open in some program.

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