Full message:
error: Ref refs/remotes/origin/user is at 3636498c2ea7735fdcedc9af5ab3c8689e6abe77 but expected a21359c6cc2097c85775cde6a40105f4bd7100ec From github.com:{github project url} ! a21359c..6273ffc user -> origin/user (unable to update local ref)
Solution. Unsure the root cause of the "reference broken". To fix it, delete this file . git/refs/remotes/origin/master , and git fetch to retrieve it back.
The short answer is simple: no, the remote-tracking branch remains unaffected.
Forcing Git Pull The key command to force a git pull from a remote repository is git reset --hard origin/master . The other commands are to ensure you don't lose any data, by making a backup! First, git fetch --all syncs up our remote to our local.
If you are running git under a file system that is not case sensitive (Windows or OS X) this will occur if there are two branches with the same name but different capitalisation, e.g. user_model_changes
and User_model_changes
as both of the remote branches will match the same tracking ref.
Delete the wrong remote branch (you shouldn't have branches that differ only by case) and then git remote prune origin
and everything should work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With