From: Jeff King <peff@peff.net>
To: "Romain Vimont (®om)" <rom@rom1v.com>
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 15:52:03 -0500 [thread overview]
Message-ID: <20120224205203.GA21780@sigill.intra.peff.net> (raw)
In-Reply-To: <1330113345.2727.3.camel@rom-laptop>
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
next prev parent reply other threads:[~2012-02-24 20:52 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 [this message]
2012-02-24 21:42 ` Romain Vimont (®om)
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=20120224205203.GA21780@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=rom@rom1v.com \
--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).