Git 是当下最常用的代码管理库,是程序员日常工作中使用频率最高的工具,在频繁的使用过程中,难免会遇到各种各样的问题,今天跟大家分享 Git 常见的错误和解决方法。
问题一:
执行Git add 'somefile'的时候,出现如下错误:
If no other git process is currently running, this probably means agit process crashed in this repository earlier. Make sure no other gitprocess is running and remove the file manually to continue.
解决方法:
rm -f ./.git/index.lock
问题二:
输入git push origin master提示出错信息:
error:failed to push som refs to .......
解决办法:
1)先输入git pull origin master先把远程服务器github上面的文件拉下来
2)再输入git push origin master
3)如果出现报错 fatal: