【发布时间】:2019-02-18 18:54:54
【问题描述】:
这不是重复的。我查看了this stack overflow post 和this post 并尝试了他们的解决方案,但没有成功。
我正在使用 Ubuntu 16.04 并尝试将项目推送到 Github。
当我跑步时:
git push jr master
我收到此错误:
error: update_ref failed for ref 'refs/remotes/jr/master': cannot lock
ref 'refs/remotes/jr/master': Unable to create
'/home/john/Desktop/john-rykken-V2/.git/refs/remotes/jr/master.lock':
File exists.
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
Everything up-to-date
我已经运行了以下命令:
rm -f .git/refs/heads/master.lock
rm -f .git/index.lock
都没有用。我还重新启动了我的机器并运行ps -a | grep git,但没有找到任何正在运行的进程。最后,当我进入我的项目目录并手动搜索master.lock时,我找不到它。
建议?我的下一步是重新克隆存储库。
【问题讨论】:
标签: git github ubuntu-16.04