8

I have a problem when I do "git add ." I received an error message "Killed: 9". If I try again "git add ." I received an another error:

fatal: Unable to create './crmeasy/.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.

If I delete ./.git/index.lock file and try again I receive the same cycle of errors. I try to commit new empty Django project virtualenv dir. How could I solve the issue?

SavinI
  • 180
  • 4
  • 15
  • 5
    I found the solution! I have add venv dir (my virtualenv) into .gitignore then add and commit all others files. – SavinI May 13 '17 at 16:14
  • The "Killed: 9" message usually indicates you have run out of memory (including virtual memory / swap space). If on Linux, search for questions about the "OOM killer" (OOM = Out Of Memory). – torek May 13 '17 at 19:47

1 Answers1

9

This happens if you are adding your virtualenv to git.

Solution: Add the path to your virtualenv in your .gitignore file. Now you can git add --all

Recommended further reading:

Is it bad to have my virtualenv directory inside my git repository?

Vingtoft
  • 13,368
  • 23
  • 86
  • 135
  • but i _want_ to add my virtualenv to git – orion elenzil Jan 29 '19 at 19:35
  • 1
    @orionelenzil See this https://stackoverflow.com/questions/6590688/is-it-bad-to-have-my-virtualenv-directory-inside-my-git-repository – Vingtoft Jan 29 '19 at 19:37
  • thanks. yep, i'd read that but i admit i'd glossed over the parts about absolute paths being baked into the activate script and such. inspecting my own venv, that's indeed the case, and my clever plan won't work. I was hoping to avoid less technical users needing to even install pip. – orion elenzil Jan 29 '19 at 20:08