I had a remote tracking branch named origin/topic
. I never created a local branch for it, however, it exists locally because it's a remote tracking branch.
I deleted it:
$ git push --delete origin topic
Now I need to restore that branch. Since it existed as a local remote tracking branch, it should exist in garbage collection somewhere right?
I need to find the tip commit on that branch by log message (I need to grep its log message). I do not have the SHA1 since it was not printed during the push.
How can I recover this branch when the only way of identifying it is its log message?
I'm using Git v2.4
I did review this SO question, but I wasn't able to find any answers there that helped. Specifically, when it came to searching for the commit from log message when the SHA1 is unknown.