mirror of
https://github.com/git-tips/tips.git
synced 2024-09-21 00:01:03 +02:00
Merge pull request #40 from ejmr/show-most-recent-tag
Add a tip to show the most recent tag
This commit is contained in:
commit
35376fe492
|
@ -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)
|
* [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)
|
* [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)
|
* [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)
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end toc -->
|
<!-- @doxie.inject end toc -->
|
||||||
|
@ -467,5 +468,10 @@ __Alternatives:__
|
||||||
git pull origin pull/<id>/head:<branch-name>
|
git pull origin pull/<id>/head:<branch-name>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Show the most recent tag on the current branch
|
||||||
|
```sh
|
||||||
|
git describe --tags --abbrev=0
|
||||||
|
```
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end -->
|
<!-- @doxie.inject end -->
|
||||||
|
|
|
@ -264,5 +264,9 @@
|
||||||
"title": "Fetch pull request by ID to a local branch",
|
"title": "Fetch pull request by ID to a local branch",
|
||||||
"tip": "git fetch origin pull/<id>/head:<branch-name>",
|
"tip": "git fetch origin pull/<id>/head:<branch-name>",
|
||||||
"alternatives": ["git pull origin pull/<id>/head:<branch-name>"]
|
"alternatives": ["git pull origin pull/<id>/head:<branch-name>"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Show the most recent tag on the current branch",
|
||||||
|
"tip": "git describe --tags --abbrev=0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user