Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Killed: 9 after command "git add ."

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?

like image 857
SavinI Avatar asked May 13 '17 15:05

SavinI


People also ask

What should I do if a Git process crashes in Git?

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.

What happens if you don’t use Git add properly?

If you are not careful during a git add, you may end up adding files that you didn’t want to commit. However, git rm will remove it from both your staging area, as well as your file system, which may not be what you want.

Why does zsh kill all Git commands after installation?

Whenever git is installed via homebrew, at least under the M1 SoC machines, this problem occurs where zsh kills all git command not because of PATH issue but because of how homebrew clone the git repo during installation.

How to add Ignored files to a commit in Git?

The git add command can be used to add ignored files with the -f (force) option. Please see git-commit[1] for alternative ways to add content to a commit. OPTIONS


1 Answers

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?

like image 130
Vingtoft Avatar answered Sep 28 '22 03:09

Vingtoft