问题:
I am still getting this error message, when I try to move my project tree on to git repo. 当我尝试将项目树移至git repo时,我仍然收到此错误消息。
I checked the permissions of my directory with this project and these are set on 777. In terminal in the directory with my_project
I set: 我检查了此项目的目录权限,这些权限设置在777上。在带有my_project
目录的终端中,我设置了:
git init git初始化
and then if I try 然后,如果我尝试
git add . git添加
or 要么
git commit -m "first upload" git commit -m“首次上传”
so I'll get the error 所以我会得到错误
fatal: Unable to create '/path/my_proj/.git/index.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.
I tried also create a new repo and there to commit it, but unfortunately still the same error message. 我试过也创建一个新的仓库,并提交它,但是不幸的是仍然是同样的错误信息。
What is the cause of problem? 问题原因是什么?
解决方案:
参考一: https://stackoom.com/question/WywJ/Git-致命-无法创建-path-my-project-git-index-lock-文件存在参考二: https://oldbug.net/q/WywJ/Git-fatal-Unable-to-create-path-my-project-git-index-lock-File-exists
来源:oschina
链接:https://my.oschina.net/u/4432649/blog/4331895