fatal: update_ref failed for ref 'HEAD'
Looks like the last commit on Atlassian Sourcetree crashed and I have a file corrupted in the process. Here's my troubleshooting steps:
1. Fine out what caused crash - see previous post
fatal: update_ref failed for ref 'HEAD': cannot lock ref 'HEAD': unable to resolve reference 'refs/heads/hotfix/admin_interface_updates': reference broken
Completed with errors, see above.
Than I removed file /my_project_directory/./git/refs/heads/master and than I can use command
git reset --hard <my_hash_of_last_commit_on_remote_branch>
Leave a comment