----- Original Message ----- 
  From: Sharan Basappa 
  To: Git for human beings 
  Cc: philipoak...@iee.org 
  Sent: Sunday, May 29, 2016 3:58 PM
  Subject: Re: [git-users] How GIT stores data


  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 

What you have is the original F.0 and F.2 now available within the normal 
commit history. The file version F.1 is now a dangling loose object in the 
repository which will eventually be garbage collected. 

As per my other reply, 
Have a search for "git lots and found loose blob" for pertenant hits. Most will 
deal with lost commits, but all types of objects can be found. 

There is a Stack Overflow question oin this very issue $SO/q/1108853/717355.

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