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?
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.
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.
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.
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
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With