Re: Resetting working files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/5/31 bill lam <cbill.lam@xxxxxxxxx>
>
> On Sun, 31 May 2009, Peter Baumann wrote:
> >       echo modified >> a.txt
> >       git add a.txt
> >       git checkout -- a.txt           (1)
> >
> >       git checkout HEAD -- a.txt      (2)
> >
> >
> > (1) This will do nothing to your file 'a.txt' in your workdir because
> >     the index and the workdir are identical
> >
> > (2) This will reset your file to the state before you run that bogus
> >     echo modified >> a.txt   comand
>
> I still do not understand what index is.
> 1. is index an replica of the committed tree
> 2. is index only transient in that its content will be reset once
>   committed?
> 3. or other ?

I think index is HEAD or a revision hash. Am I correct ?

Aaron
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]