On Tue, 10 Jan 2012 14:47:44 -0800 (PST)
Trans <transf...@gmail.com> wrote:

> My mistake was to use `--hard`, but I didn't think it would delete
> the files b/c there were not being tracked before this particular
> commit. 
That is logical, just from the opposite point of view: you asked Git to
chop off the tip commit from the current branch, adjust the HEAD ref
and then *check out* the new HEAD.  The previous state of HEAD did
track the files, so, naturally, when you check out another commit which
does not have these files tracked, Git removes these files precisely
because they were tracked in the commit you move away from.
If Git behaved the other way, checking out different revisions would
not have worked sensibly.

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