diff --git a/README.md b/README.md index 39cf0b3..0bce4e9 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ * [Ignore one file on commit (e.g. Changelog).](https://github.com/git-tips/tips#ignore-one-file-on-commit-eg-changelog) * [Stash changes before rebasing](https://github.com/git-tips/tips#stash-changes-before-rebasing) * [Fetch pull request by ID to a local branch](https://github.com/git-tips/tips#fetch-pull-request-by-id-to-a-local-branch) +* [Show the most recent tag on the current branch](https://github.com/git-tips/tips#show-the-most-recent-tag-on-the-current-branch) @@ -467,5 +468,10 @@ __Alternatives:__ git pull origin pull//head: ``` +## Show the most recent tag on the current branch +```sh +git describe --tags --abbrev=0 +``` + diff --git a/tips.json b/tips.json index 3f445ba..72c2075 100644 --- a/tips.json +++ b/tips.json @@ -264,5 +264,9 @@ "title": "Fetch pull request by ID to a local branch", "tip": "git fetch origin pull//head:", "alternatives": ["git pull origin pull//head:"] + }, + { + "title": "Show the most recent tag on the current branch", + "tip": "git describe --tags --abbrev=0" } ]