I\'m trying to learn how to use Git and have created a small project with an HTML, CSS, and Javascript file. I made a branch from my basically empty project and then made so
Ok I ended up getting it to work by running '$ git rm .git/index.lock'... It's weird because I did that a few times before to no avail but hey computers right?
For me the solution was as simple as closing my IDE and then checking out. A teammate of mine had accepted my PR and merged the code via TFS. Removing the .lock files did not work.
use following command in case you are facing 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.
rm -f .git/index.lock
git reset and after reset command use git status, git add, and git commit -a or git commit -m "your message", git push origin master.
Well, what helped me was simply making a copy of the repo folder with everything including the .git folder and working from the copy.
That worked for me.
I tried deleting .git/index
but didn't work, I end up uninstalling go and removing all folders that has go
name in it, and then installing go again, and it workerd!
For me for any reason :
rm .git/index.lock
Didn't work, so I just went to the .git file and deleted it manually which worked fantastically.