我创建了一个空回购并为Python开发初始化了一个Virtualenv。在安装所需的软件包并通过停用从Virtual env中出来后,我无法添加/提交给Git。无法从Virtualenv添加/提交git
[email protected]:~/Git/Sample-Repo$ git add *
Killed: 9
[email protected]:~/Git/Sample-Repo$ git add helloworld
fatal: Unable to create '/Users/danis/Git/Sample-Repo/.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.
步骤到目前为止已经试过:使用创建的.gitignore文件中的主目录下的命令rm -f .git/index.lock
- 删除index.lock文件,并添加.ENV它
你运行内存(包括磁盘上自动分配虚拟内存),这是困难的,但在MacOS并非不可能。请参阅https://discussions.apple.com/thread/6887841?start=0&tstart=0 – torek