Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

Git - fix the 'error: cannot lock ref 'refs/remotes/origin/'

0 votes
added Apr 11 in Git by LC Marshal Captain (22,730 points)
git gc --prune=now

and delete .git\refs\remotes\origin folder

1 Response

0 votes
responded May 13 by LC Marshal Captain (22,730 points)

As a workaround, you can always;

// Create new branch
git checkout -b newbranch

//push it back to remote
git push --set-upstream origin trx-local - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.