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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]