解决git for windows无法commit
Posted in 原创 . on Wednesday, July 24th, 2013 by JM
Github windows: Commit failed: Failed to create a new commit
这时候选择Open Shell
输入git status 查看为同步的修改
然后通过git add [filename] update git rm [filename] remove
这时候可以会报错
fatal: Unable to create './.git/index.lock': File exists.
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
解决办法 rm -force ./.git/index.lock
然后再次用 git add
如果出现错误
Rename from '.git/index.lock' to '.git/index' failed. Should I try again? (y/n)
那去杀掉进程
ssh-agent.exe
C:\Users\Tom\AppData\Local\GitHub\PortableGit_8810fd5c2c79c73adcc73fd0825f3b32fdb816e7\bin\ssh-agent.exe
然后再进行一次 同步 有更改过的文件 最后在gif windows 里面commit就可以成功了