How to fix error: bad ref for .git/refs/heads/main in Git | DevErrors