Fix: Git Pull Error: unable to resolve reference refs/remotes/origin/master: reference broken

% git pull

error: cannot lock ref 'refs/remotes/origin/master':
unable to resolve reference 'refs/remotes/origin/master': reference broken

You may get the above error when trying to pull a get repository from the origin.

Fix: Error: Unable to resolve reference

Remove the below folder from your local get repository us the rm command.

% rm .git/refs/remotes/origin/master
Remove git - refs - remotes - origin - master

Once done, do a git fetch

% git fetch

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap