git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Q: How to tag individual files

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 13, 2008, 05:35 UTC
Message-ID
<20080713053537.GA32746@spearce.org>
In-Reply-To
<g5bvte$52j$1@ger.gmane.org>
Poojan Wagh <poojanwagh@gmail.com> wrote:
Show 8 quoted lines
> The crash course at: http://git.or.cz/course/svn.html says:
>
>> You usually tag commits but if you want, you can tag files (or trees, 
>> but that's a bit low-level) as well. 
>
> I've done a bit of searching, and I can't for the life of me figure out  
> how to tag an individual file. Help from the group would be much  
> appreciated. Thanks.

You don't tag individual files. Git is snapshot based. You tag the entire project at once.

The comment you quoted was talking about tagging a single listing of blobs (a tree) or a single blob (stream of bytes). This can be handy in rare cases. In the linux kernel for example the prior history was stored by tagging the tree of that prior history, as there was no git based history preceeding that snapshot, so there were no commits to tag. In git.git Junio publishes his GnuPG public key as a tagged blob, making it available to validate signed tag objects.

So you can't tag individual files. The comment is a bit misleading and gets far too low-level for an otherwise high-level conversion guide.

-- 
Shawn.
Previous: Poojan WaghNext: Poojan Wagh
Message 2 of 4 in “Q: How to tag individual files”
  1. Poojan WaghJul 13, 2008
  2. Shawn O. PearceJul 13, 2008
  3. Poojan WaghJul 13, 2008
  4. Petr BaudisJul 13, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.