Commit stopped to download

i had used git hub about 2 month, and last time i had pushed 2 days ago, and from yesterday i started get messageu
fatal: cannot lock ref ‘HEAD’: unable to resolve reference ‘refs/heads/main’: reference brokenommi
l
and in menu the branch is unknown, while on github the main branch is persisted.

an it want to push all 3000 files , while i had changed 2 files only.

i guessed that reference in my local repository is broken.
how to correct it?