"HEAD not found below refs / heads" after I press commit with CR / CRLF changes

I have a local repository and a remote open repository. I made changes to my local files, and the other guy also made changes, but he just sent me the files. I copied them to my local tree and committed them. When committing, I have messages about files that I copied into brackets

LF will be replaced by CRLF

I just transferred all the files and pushed them to a remote repository. And when on the remote I started

git branch

I get the following error message

HEAD not found below refs/heads!

Now it seems to me that this is because of these files with CR instead of CRLF.

Any suggestions? Thank any help on how to deal with such situations / fix my repo.

+5
2

, HEAD . , :

git symbolic-ref HEAD

, :

git symbolic-ref HEAD refs/heads/branch-that-exists
+11

HEAD refs/heads!

, "HEAD" " refs/heads". , " refs/remotes"

git symbolic-ref HEAD

/ /CoreCLR/

"HEAD", :

git symbolic-ref HEAD

< > //

0

All Articles