I created an empty repo and initialized a Virtualenv for Python development. After installing the required packages and coming out of the Virtual env by deactivating, I am not able to add/commit to Git.
danis@Daniss-MacBook-Pro:~/Git/Sample-Repo$ git add *
Killed: 9
danis@Daniss-MacBook-Pro:~/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.
Steps Tried so far:
- Removed index.lock file using the command
rm -f .git/index.lock
- Created .gitignore file in the home directory and added .env to it