git操作失败并提示 Another git process seems to be running in this repository, e.g. an editor opened by '...

Git操作的过程中突然显示Another git process seems 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文件即可。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。