I wonder if you could help me. I created a new branch on GitHub using the web interface. I checked out the master repository and switched to this branch and pulled, using tortoise git.

I made all my changes and went to commit them using tortoise git. On committing, I received the error that I had no branch selected to commit to. I switched to branch again and I committed other files. I noticed that the files I had originally committed, showed as committed via a green tick, but the commit message was missing from the log. The changes are absent from the remote repository, but still present on my hard drive.

I turned my computer off and went home, to fix the issue tomorrow, after all, the file changes were still on my hard drive. I asked a colleague for help with the issue and they performed a sync. The changes to my files on the missing commit are gone. There wasn't a warning that we would be reverting changes. Does anyone have any ideas? Many thanks.

1 Answer 1


I switched my repository to temp. Looking through the reflog, my commit appeared - not the normal log. I rebased to this commit and was able to retrieve my changes - phew.

  • Can you share the steps you took? Screenshots / commands issued would be very helpful!
    – Attie
    Feb 12, 2019 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.