This isn't a duplicate. I have looked at this stack overflow post and this post and tried their solutions, which didn't work.
I'm using Ubuntu 16.04 and trying to push a project to Github.
When I run:
git push jr master
I get this error:
error: update_ref failed for ref 'refs/remotes/jr/master': cannot lock
ref 'refs/remotes/jr/master': Unable to create
'/home/john/Desktop/john-rykken-V2/.git/refs/remotes/jr/master.lock':
File exists.
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
Everything up-to-date
I have run the following commands:
rm -f .git/refs/heads/master.lock
rm -f .git/index.lock
Neither worked. I've also rebooted my machine and run ps -a | grep git
, but didn't find any running processes. Finally, when I go into my project directory and manually search for master.lock, I can't find it.
Suggestions? My next step is re-cloning the repository.