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

Re: [BugReport] git tag -a / git show

From
Romain Vimont (®om) <rom@rom1v.com>
Date
Feb 24, 2012, 19:55 UTC
Message-ID
<1330113345.2727.3.camel@rom-laptop>
In-Reply-To
<4F47E48D.4080501@in.waw.pl>
Thank you for your answer.

After my message this morning, that's what I did: I commited with the mock data then tag.

Tonight, I just tried something which do exactly what I wanted to do this morning:

$ git checkout -b temp $ git commit -a -m 'My config file with mock_data=true' $ git tag -a v0.1 -m v0.1 $ git checkout master $ git branch -D temp

With these commands, the tag is associated to a commit which is not in any branch.

Regards, ©om

Le vendredi 24 février 2012 à 20:27 +0100, Zbigniew Jędrzejewski-Szmek a écrit :

Show 20 quoted lines
> On 02/24/2012 11:24 AM, Romain Vimont (®om) wrote:
> > $ git log --pretty=online
> > 0ef41513d0b6d0ad28f21d0ac1da7096ad1dc6ff This is the last commit
> > a4702c69c28484d357179166cf3b116764da20a4 This is a commit
> >
> > Now, I edit some files (for example in a config file "mock_data=true"),
> > then I want to tag without commiting this change.
> >
> > $ git tag -a v0.1 -m 'My v0.1 with mock data'
> 
> > And it shows the diff between a4702c69c28484d357179166cf3b116764da20a4
> > and 0ef41513d0b6d0ad28f21d0ac1da7096ad1dc6ff (the two last commits).
> 
> Hi Romain,
> git tag attaches the tag to the last commit, 0ef41513 in your case. 
> Dirty changes in your tree are ignored by the tag command. You would 
> have to commit them first, and attach the tag to this new commit.
> 
> zbyszek
> 
Previous: Zbigniew Jędrzejewski-SzmekNext: Jeff King
Message 3 of 9 in “[BugReport] git tag -a / git show”
  1. Romain Vimont (®om)Feb 24, 2012
  2. Zbigniew Jędrzejewski-SzmekFeb 24, 2012
  3. Romain Vimont (®om)Feb 24, 2012
  4. Jeff KingFeb 24, 2012
  5. Romain Vimont (®om)Feb 24, 2012
  6. Jeff KingFeb 24, 2012
  7. Junio C HamanoFeb 24, 2012
  8. Romain Vimont (®om)Feb 24, 2012
  9. Andreas SchwabFeb 24, 2012

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.