Here is my case:
- I was working on one branch.
- Pushed new commits to the remote.
- Switched back to the master branch.
But suddenly after typing git checkout master
command my computer encountered blue screen of death and an unexpected force shut down happened. After starting back my computer I have checked the status of my current branch and as a result I got each and every file as marked new files.
Now, I am stuck at this point and after git log
command I am getting error
$ git log
fatal: your current branch appears to be broken
How to solve this problem and recover my branch?.
I am working with windows 7 and git bash latest version
Edit: I don't want to delete this branch.
.git/HEAD
? Does it point to a valid branch name? Does the branch name then point to a valid commit hash? – Mendiegit push
and then had to restart upon opening it again. After the restart I get the same error when doinggit log
– Paigepaik