一、Git操作失败并提示Another git process seems to be running in this......
fatal: Unable to create 'E:/H5brainking/.git/index.lock': File exists.
Git操作的过程中突然显示Another git process semms to be running in this repository, e.g. an editor opened by ‘git commit’. Please make sure all processes are terminated then try again. If it still fails, a git process remove the file manually to continue…
翻译过来就是git被另外一个程序占用,重启机器也不能够解决。
原因在于Git在使用过程中遭遇了奔溃,部分被上锁资源没有被释放导致的。
解决方案:进入项目文件夹下的 .git文件中(显示隐藏文件夹或rm .git/index.lock)删除index.lock文件即可。
二、git Please tell me who you are解决方法
在git创建项目时出现,是因为在创建git文件夹的时候信息不完善导致的
1.git init
2.git config user.name "你的名字"
3.git config user.email "你的邮箱"
4.git add *
5.git commit -m "some init msg"
解决方法是当出现这个上述提示后 接着补充。命令行中执行:
git config --global user.email "你的邮箱"
git config --global user.name "你的名字"
# 参考:https://blog.youkuaiyun.com/qq_26540999/article/details/53445589