当我尝试将项目树移动到git repo时,我仍然收到此错误消息.
我用这个项目检查了我的目录的权限,这些是在777上设置的.在my_project我设置的目录中的终端:
git init
如果我试试
git add.
要么
git commit -m"首次上传"
所以我会得到错误
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.
Run Code Online (Sandbox Code Playgroud)
我也尝试创建一个新的repo并在那里提交它,但遗憾的是仍然是同样的错误信息......我已经有点绝望了,我试着找到整个下午的解决方案,但仍然没有成功...
请问有谁帮助我,问题的原因是什么?
百万次谢谢!
使用GitHub Windows客户端我进行了同步以将远程更改提取到本地计算机,但在完成同步之前,我的磁盘空间不足,同步失败.现在我似乎有一堆本地更改,实际上是从原点中提取的更改.我试着运行git pull但得到了:
C:\Users\Tom\SourceLog [master +4 ~26 -0 !]> git pull
Updating b3a86e1..5afd74f
error: Your local changes to the following files would be overwritten by merge:
SourceLog.Interface/IChangedFile.cs
SourceLog.Interface/ILogEntry.cs
...
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
Lib/MSBuildExtensionPack/4.0.6.0/Ionic.Zip.dll
Lib/MSBuildExtensionPack/4.0.6.0/MSBuild.ExtensionPack.dll
...
Aborting
Run Code Online (Sandbox Code Playgroud)
所以现在我想丢弃当地的变化,但我得到了:
C:\Users\Tom\SourceLog [master +4 ~26 -0 !]> git checkout -- .
Rename from '.git/index.lock' to '.git/index' failed. Should I try again? (y/n) …Run Code Online (Sandbox Code Playgroud) 我最近开始使用Cloud9 IDE.我使用Git作为版本控制,它工作正常,直到最近我尝试了这个命令:
git add .
Run Code Online (Sandbox Code Playgroud)
它因以下错误而失败:
ubuntu:~/workspace (master) $ git add .
fatal: Unable to create '/home/ubuntu/workspace/.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.
ubuntu:~/workspace (master) $
Run Code Online (Sandbox Code Playgroud)
我有sudo权限,使用sudo上面的命令给我其他错误.索引不会更新.它仍然显示我喜欢修改,但没有添加.
疯狂的部分是,该文件.git/index.lock不存在,当我试图找到是否有任何git进程在后台运行时,使用top或者ps grep,我找不到任何进程.
我在Cloud9环境中使用Ubuntu 14.04 LTS.我是RW权限的合作者之一,但我没有重新启动权限.我尝试了以下但它们不起作用:
sudo reboot
sudo shutdown -r now …Run Code Online (Sandbox Code Playgroud)