On 2016-05-29, at 7:58 AM, Sharan Basappa <sharan.basa...@gmail.com> wrote:

> Folks,
> Having started using GIT, one more question ...
> I do some work on a file. Assume the file is version is F.1. I think it is 
> fairly done and I stage it (git add) but don't commit.
> Now later, I realize that I need to make some more changes to the file. I 
> make changes (F.2), add and them commit.
> I assume that the commit object will only point to the latest file (F.2). Is 
> this correct?
> Is there a way to retrieve the previous version of the file (that is, F.1).
> Essentially, I am trying to get some intermediate version of a file even 
> through I never committed it.
> if I cant get F.1, whatever happens to the it as far as git repository is 
> concerned?

The commit object will reference F.2.

A blob for F.1 is in git's storage, but there is now nothing referencing it.
Eventually it will be garbage collected and deleted.
Until then, it is in there, somewhere, but you have no idea where nor any way 
to recover it.

Entertaining minecraft videos

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to