问题
I give this error when I use
git log
fatal: your current branch appears to be broken
my branch file was broked I opened .git/refs/heads/mybranch in notepad but I see only some ????????? in file
I know I must find branch hash and copy that into .git/refs/heads/mybranch file but I don't how to find that hash
I read this topic Broken branch in git, fatal: your current branch appears to be broken
回答1:
finally, after very pain, this worked for me
1 get back up from your .git directory
2 open file .git\logs\refs\heads\<branch name> with your editor
3 copy second hash of your last line
4 open file .git\refs\heads\<branch name> and delete everything in this file
5 past that hash to .git\refs\heads\<branch name>
来源:https://stackoverflow.com/questions/57580891/fatal-your-current-branch-appears-to-be-broken