git - 'Killed: 9' 使用 git add *
问题描述
使用时出现错误
git add *
这只是说
Killed: 9
如果我再次输入 git add * 我得到
fatal: Unable to create
'.git/index.lock': File exists.
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/index.lock 并再次输入 git add * ,我会再次遇到被杀死的错误。
我检查了stackoverflow上的其他答案,比如
但我不使用任何虚拟环境。
解决方案
就我而言(将 Cocoapods 依赖项文件夹添加到可能相当大的 git 中),问题是 Apple 在 macOS Catalina 中的 git。更新brew install git
解决了它。
必须启动新的终端会话才能使新版本可用。
推荐阅读
- python - 合并两个不同结构的数据框
- javascript - 如何检查值是否存在于打字稿中的数组元素中?
- json - 与 JsonResponse 相比,使用 djangorestframework 有什么额外的优势吗?
- discord - 如何将建议命令公开给所有服务器?不和谐.js
- sql - “SELECT column ... WHERE”,知道其他列的值,不能使用子查询
- flutter - 如何在 Row 中使用 ClipRRect 和 ListTile?
- android - Flutter - 如何扫描 Wifi 接入点并检索 Wifi 的 SSID 和 MAC 地址列表,而无需在 Flutter 中连接到 Wifi
- python - O(n) 和 O(n logn) 之间的比较
- sql - 替换sql server中输入错误的日期
- r - R-highcharter R中的平行坐标