Re: Individual file snapshots

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

 



In article <alpine.DEB.2.00.1002121316260.10583@xxxxxxxxxxxx>,
 Peter Krefting <peter@xxxxxxxxxxxxxxxx> wrote:

> Ron Garret:
> 
> > I would like to be able to store snapshots of individual files without 
> > making a commit on the main branch.
> 
>    git hash-object -w filename
> 
> will add the file to the object database, outputting it's hash value.
> 
>    git tag mytag hashvalue
> 
> creates a tag "mytag" pointing to that file.
> 
>    git show mytag
> 
> will output the file you put in.

Ah, cool!  Thanks.  I knew about git hash-object, but I did not know 
that you could tag the resulting hash.  I thought you could only tag 
commit objects.

rg

--
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]