git - 我收到一条错误消息 rm: cannot remove '.git/index.lock': No such file or directory
问题描述
首先,当我尝试在 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.
所以我运行rm .git/index.lock
,我得到另一个错误:
rm: cannot remove '.git/index.lock': No such file or directory
解决方案
事实证明,需要删除两个名为 COMMIT_EDITMSG.swp 和 index.lock 的文件。还有一些 .vs 文件显然是由 Visual Studio 创建的。
推荐阅读
- c# - 在反射中使用字符串而不是 System.String?
- curl - 将文件上传到 Postman 的导入 cURL 命令
- ios - 如何更快地从 Firebase Firestore 获取数据?
- python-3.x - python 短信存储使用类
- swift - 在 bash 脚本中运行 swift 脚本
- java - 在 TableView 中使用 PropertyValueFactory 中的值 - JavaFx
- ios - 更改了 rootViewController 但旧 rootViewController 的视图仍在 View Hierarchy 中
- jquery - 如何为每个 jquery 表情添加值
- time-series - Chronograf Dashboard 中的 TICK-STACK 表视图格式
- amazon-web-services - 区域之间的 S3 CopyObjectRequest