error: cannot lock ref 'refs/remotes/origin/main': unable to resolve reference 'refs/remotes/origin/main': reference broken From https://github.com/abohanzala/smudge-admin ! [new branch] main -> origin/main (unable to update local ref) code example
Example: git error: cannot lock ref 'refs/remotes/origin/master': unable to resolve reference 'refs/remotes/origin/master': reference broken
rm .git/refs/remotes/origin/master
git fetch