I tried to soft reset my branch to remove a directory I had accidentally pushed to GitHub. After the soft reset I was still getting the following error:
fatal: Unable to create '/Users/mprestemon/vagrant-local/www/national-fuel/public_html/wp-content/.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.
I came across another StackOverflow article that said to remove .git/index.lock with the following command:
rm -f ./.git/index.lock
When I run that command and try to checkout or pull from another branch I now get this BUG:
BUG: unpack-trees.c:699: pos must point at the first entry in this directory
I can't figure out how to clean up my repository and ensure that all git processes have been completed/aborted. Any advice how to get around this?