I've had this happen too, multiple times, doing nothing other than a normal checkin of new changes. Checkin as usual, and suddenly *bam* every previous checkin in log/history is gone.
Has happened to me at least half a dozen times, with no warning or pattern that I can find. This is *insane* behavior for a revision control client! Being able to list the reflog and view previous commit messages doesn't restore my history, or allow me to see the changes made to that history. I quit using GitX because of this. --Bill On Thursday, October 28, 2010 8:23:17 AM UTC-6, brotherbard wrote: > > On Oct 28, 2010, at 7:43 AM, TTop wrote: > > > I was using GitX 0.7.1 to prepare a commit. Something happened -- I > > don't know what -- and suddenly my branch only had a single commit in > > it that appears to contain all the files in my tree. So I went to the > > command line and did this: > > > > $ git reset --soft HEAD^ > > fatal: ambiguous argument 'HEAD^': unknown revision or path not in the > > working tree. > > > > When I do 'git log' in this branch, there's only one commit. Now, I > > had many commits in this branch a few minutes ago. I really, really, > > don't want to lose this. > > > > What steps should I take to attempt to recover? Is there some log to > > see what happened? > > > Use 'git reflog' to see the history of the changes to HEAD or 'git reflog > show branchname' to see changes to just that branch. Find the last SHA that > seems valid and check it out. > > > --Nathan > > http://brotherbard.com/ > >
