Skip to content

Conversation

ejmr
Copy link
Contributor

@ejmr ejmr commented Nov 3, 2015

This tip shows how to display the most recent tag reachable on the
current branch. The use of --abbrev=0 is necessary otherwise the
output would contain additional information (specifically part of a
commit hash), appended to the tag name. It's worth noting that this
command is usable for branches other than the current one, e.g.

$ git describe --tags --abbrev=0 master

That would show the most recent tag on the master branch regardless
of whatever branch the user is currently on.

Signed-off-by: Eric James Michael Ritz ejmr@plutono.com

This tip shows how to display the most recent tag reachable on the
current branch.  The use of `--abbrev=0` is necessary otherwise the
output would contain additional information (specifically part of a
commit hash), appended to the tag name.  It's worth noting that this
command is usable for branches other than the current one, e.g.

    $ git describe --tags --abbrev=0 master

That would show the most recent tag on the `master` branch regardless
of whatever branch the user is currently on.

Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
@hemanth
Copy link
Contributor

hemanth commented Nov 6, 2015

Nice! Thanks. 👍

hemanth added a commit that referenced this pull request Nov 6, 2015
Add a tip to show the most recent tag
@hemanth hemanth merged commit 35376fe into git-tips:master Nov 6, 2015
@ejmr ejmr deleted the show-most-recent-tag branch November 18, 2015 02:18
blanjatest2 pushed a commit to blanjatest2/tips that referenced this pull request Apr 15, 2020
Add a tip to show the most recent tag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants