I have local repository, and a remote bare repository. I've made changes to my local files, and other guy has made changes too, but he just sent me files. I've copy-pasted them in my local tree and committed. On commit I've got messages on files that I have copy-pasted
LF will be replaced by CRLF
I've just committed all the files and pushed them to remote bare repository. And when on remote I run
git branch
I get the next 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? Will appreciate any help on how to handle such situations/fix my repo.
It looks like the HEAD
on your remote is pointing to an invalid branch. You can view what it's pointing to with:
git symbolic-ref HEAD
and fix it to point at a valid branch with:
git symbolic-ref HEAD refs/heads/branch-that-exists
I get the next error message
HEAD not found below refs/heads!
It means that 'HEAD' points outside of 'refs/heads'. For example, in my case it was pointing into 'refs/remotes'
git symbolic-ref HEAD
refs/remotes/coreclr/master
I had to edit 'HEAD' to fix the issue:
git symbolic-ref HEAD
refs/heads/master
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