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, 21:42 UTC
Message-ID
<1330119763.2727.10.camel@rom-laptop>
In-Reply-To
<20120224205203.GA21780@sigill.intra.peff.net>
Thank you, I didn't know this '^' thing ;-)
Le vendredi 24 février 2012 à 15:52 -0500, Jeff King a écrit :
Show 24 quoted lines
> On Fri, Feb 24, 2012 at 08:55:45PM +0100, Romain Vimont (®om) wrote:
> 
> > 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
> 
> There is nothing at all wrong with the commands above, but you might be
> interested to know that you can do it without the temporary branch:
> 
>   $ git commit -a -m 'My config...'
>   $ git tag -m v0.1 v0.1
>   $ git reset HEAD^
> 
> The final reset will rewind your branch tip and the index state to what
> it was before the commit, but will leave the files in the working tree
> untouched.
> 
> -Peff
> 
Previous: Jeff KingNext: Jeff King
Message 5 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.