【Git】Git提示Another git process seems to be running in this repository, e.g. an editor opened by ..错误

简介: 【Git】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 may have crashed in this repository earlier: remove the file manually to continue.


它的翻译是:


另一个git进程似乎在这个存储库中运行,例如由’git commit’打开的编辑器。 请确保所有流程终止然后再试一次。 如果它仍然失败,那就是一个git进程可能早先在此存储库中崩溃:手动删除文件以继续。


大概意思就是说,当前已经有了一个编辑器打开了“git commit”指令,请关闭所有git相关的进程重试,否则,请手动删除那个文件。


windows对于进程的同步互斥管理,是有资源上锁机制的。猜测这里肯定是有进程对某资源进行了加锁,但是由于进程突然崩溃,未来得及解锁,导致其他进程访问不了


我们删除互斥的一个文件就行了,进入工作区目录下的隐藏文件.git,其中的index.lock文件删除掉,问题解决。

原文:https://blog.csdn.net/BlizCp/article/details/114100419

下班~

目录
相关文章
|
23天前
|
开发工具 git C++
【App Service】VS Code直接部署App Service时候遇见 “fatal: not a git repository (or any of the parent directories): .git”
通过VS Code发布Python App Service的时候,遇见了发布失败错误: The deployment failed with error: fatal: not a git repository (or any of the parent directories): .git . Please take a few minutes to help us improve the deployment experience
73 24
|
安全 网络安全 开发工具
git 提示:fatal: Could not read from remote repository.
git 提示:fatal: Could not read from remote repository.
852 0
git 提示:fatal: Could not read from remote repository.
|
3月前
|
前端开发 JavaScript PHP
【Azure 应用服务】App Service 在使用GIt本地部署,上传代码的路径为/home/site/repository,而不是站点的根目录/home/site/wwwroot。 这个是因为什么?
【Azure 应用服务】App Service 在使用GIt本地部署,上传代码的路径为/home/site/repository,而不是站点的根目录/home/site/wwwroot。 这个是因为什么?
|
4月前
|
监控 安全 开发工具
git fatal: detected dubious ownership in repository at ‘xxx‘ 彻底解决方法
调整文件所有权和权限后,你应该能够无误地进行Git操作。持续的维护与监控文件系统的安全性能降低将来遇到类似问题的风险,并保证团队能够高效协作。如果你是在团队环境中工作,建议建立明确的协作规则和文件管理实践,以避免此类问题。
453 3
|
5月前
|
开发工具 git
git error 已解决【Another git process seems to be running in this repository, e.g. an editor opened by】
git error 已解决【Another git process seems to be running in this repository, e.g. an editor opened by】
78 2
|
网络安全 开发工具 git
git clone之报错git@gitee.com:Permission denied (publickey).fatal: Could not read from remote repository
git clone之报错git@gitee.com:Permission denied (publickey).fatal: Could not read from remote repository
526 0
|
开发工具 git 开发者
解决fatal: not a git repository (or any of the parent directories): .git问题
解决fatal: not a git repository (or any of the parent directories): .git问题
1628 1
|
6月前
|
网络安全 数据安全/隐私保护
解决git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Pleas
解决git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Pleas
932 0
|
11月前
|
开发工具 git
解决:fatal: not a git repository (or any of the parent directories): .git的问题
解决:fatal: not a git repository (or any of the parent directories): .git的问题
|
Shell 开发工具 git
【Git初探】Git中fatal: Not a git repository (or any of the parent directories): .git错误的解决办法
【Git初探】Git中fatal: Not a git repository (or any of the parent directories): .git错误的解决办法
11207 0