git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Romain Vimont (®om)" <rom@rom1v.com>
To: Jeff King <peff@peff.net>
Cc: "Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>, git@vger.kernel.org
Subject: Re: [BugReport] git tag -a / git show
Date: Fri, 24 Feb 2012 22:42:43 +0100	[thread overview]
Message-ID: <1330119763.2727.10.camel@rom-laptop> (raw)
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 :
> 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
> 

  reply	other threads:[~2012-02-24 21:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-24 10:24 [BugReport] git tag -a / git show Romain Vimont (®om)
2012-02-24 19:27 ` Zbigniew Jędrzejewski-Szmek
2012-02-24 19:55   ` Romain Vimont (®om)
2012-02-24 20:52     ` Jeff King
2012-02-24 21:42       ` Romain Vimont (®om) [this message]
2012-02-24 21:44         ` Jeff King
2012-02-24 19:50 ` [Not A BugReport] " Junio C Hamano
2012-02-24 19:58   ` Romain Vimont (®om)
2012-02-24 23:14     ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1330119763.2727.10.camel@rom-laptop \
    --to=rom@rom1v.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=zbyszek@in.waw.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).