Hi Lem,

On Fri, Jul 6, 2012 at 4:25 PM, lem torov <ulem...@gmail.com> wrote:
> i was using netbeans ide and as CVS i was using git included into IDE.
> once i lanch standalone git-msys in my project directory
> git branch
> showed me
> * no branch
>   master
>   you are not in any branch
> i did
> git checkout master
> and i lost like 5 weeks of my work. if there is any way to restore it?

'git reflog' is your friend. Try this command - it should show your
where the HEAD pointed to in last few operations. Using it you should
be able to figure out the commit id of the tip of the dangling branch
you were earlier on.
Once you have the commit id, just do:

git checkout -b my_old_branch <commit_id>

This will create a new 'my_old_branch' pointing to that commit...


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to