git-describe

Git describe giving different tags

好久不见. 提交于 2019-12-13 12:17:13
问题 I have tagged my repository with the tag "Release_V1.0.0.4". But here is what I got from "git describe" and "git describe origin". [root pds_series]# git describe Release_V1.0.0.2-22-g0859de9 [root pds_series]# git describe origin Release_V1.0.0.2-18-gce2b24c With "git describe --all" and "git describe --tags" I got the right tag. [root pds_series]# git describe --all tags/Release_v1.0.0.4 [root pds_series]# git describe --tags Release_v1.0.0.4 Also, with following command I got the right tag

git describe: inexplicable commit count

心不动则不痛 提交于 2019-12-11 03:52:27
问题 Consider this excerpt of git log --oneline --decorate --graph : * 552485a (HEAD -> master, origin/master) Finish v0.8.4 |\ | * c198066 (tag: v0.8.4) some commit message * | 343af72 Finish v0.8.3 |\ \ | |/ | * 0267e30 (tag: v0.8.3) some commit message * | 8f0ff57 some commit message |\ \ | |/ ... (NB: the tag v0.8.4 is on a commit from branch 'develop') How comes that when I run git describe I get this: v0.8.4-16-g552485a that is, git counts 16 commits since tag v0.8.4. I'd expect it to return

Why is `git describe -dirty` adding a `-dirty` suffix when describing a clean checkout?

牧云@^-^@ 提交于 2019-12-09 06:07:46
问题 I have just discovered the --dirty option to git describe and it looks like it should do something very useful, i.e. append a suffix to the output of git describe when the working tree is dirty, however that doesn't seem to be the case on some of my repositories: $ git status # On branch 8.30 nothing to commit (working directory clean) $ git describe --dirty 8.30rel-8-g9c1cbdb-dirty I thought this might be because the working directory is dirty relative to the tag , but that doesn't seem to

Git: How to get the name of checked out tag when 2/more tags on same commit

不问归期 提交于 2019-12-06 06:04:04
问题 I have a git commit with 2 tags, like this: commit1-----tagA,tagB Checkout "tagA" by git checkout tagA Question: How to get the tag name of current checkout? I have try git describe , but it's always return name "tagB", expect return "tagA". Seems git describe only be able to return the most recent tag name, see from git manual The command finds the most recent tag that is reachable from a commit. If the tag points to the commit, then only the tag is shown. Otherwise, it suffixes the tag name

Git describe giving different tags

寵の児 提交于 2019-12-04 15:58:25
I have tagged my repository with the tag "Release_V1.0.0.4". But here is what I got from "git describe" and "git describe origin". [root pds_series]# git describe Release_V1.0.0.2-22-g0859de9 [root pds_series]# git describe origin Release_V1.0.0.2-18-gce2b24c With "git describe --all" and "git describe --tags" I got the right tag. [root pds_series]# git describe --all tags/Release_v1.0.0.4 [root pds_series]# git describe --tags Release_v1.0.0.4 Also, with following command I got the right tag. [root pds_series]# git log --pretty=format:'%ad %h %d' --abbrev-commit --date=short -1 2012-11-15

Git: How to get the name of checked out tag when 2/more tags on same commit

≯℡__Kan透↙ 提交于 2019-12-04 12:56:21
I have a git commit with 2 tags, like this: commit1-----tagA,tagB Checkout "tagA" by git checkout tagA Question: How to get the tag name of current checkout? I have try git describe , but it's always return name "tagB", expect return "tagA". Seems git describe only be able to return the most recent tag name, see from git manual The command finds the most recent tag that is reachable from a commit. If the tag points to the commit, then only the tag is shown. Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object and the abbreviated object name of

Why is `git describe -dirty` adding a `-dirty` suffix when describing a clean checkout?

纵然是瞬间 提交于 2019-12-03 06:46:40
I have just discovered the --dirty option to git describe and it looks like it should do something very useful, i.e. append a suffix to the output of git describe when the working tree is dirty, however that doesn't seem to be the case on some of my repositories: $ git status # On branch 8.30 nothing to commit (working directory clean) $ git describe --dirty 8.30rel-8-g9c1cbdb-dirty I thought this might be because the working directory is dirty relative to the tag , but that doesn't seem to be the case either: $ git status # On branch 1.4 nothing to commit (working directory clean) $ git

“git describe” ignores a tag

蓝咒 提交于 2019-11-29 22:47:54
In the following lines: $ git tag -n1 v1.8 Tagged the day before yesterday v1.9 Tagged yesterday v2.0 Tagged today $ git describe v1.9-500-ga6a8c67 $ Can anyone explain why the v2.0 tag is not used by "git describe", and how to fix this? The v2.0 tag is already pushed, so I am guessing that I can't just delete and re-add it. git describe uses only annotated tags by default. specify the --tags option to make it use lightweight tags as well make sure you've checked out the correct commit ( git rev-parse HEAD ). annotated tags are created with git tag -a . if you do git show <tagname> and you see

“git describe” ignores a tag

柔情痞子 提交于 2019-11-28 19:29:22
问题 In the following lines: $ git tag -n1 v1.8 Tagged the day before yesterday v1.9 Tagged yesterday v2.0 Tagged today $ git describe v1.9-500-ga6a8c67 $ Can anyone explain why the v2.0 tag is not used by "git describe", and how to fix this? The v2.0 tag is already pushed, so I am guessing that I can't just delete and re-add it. 回答1: git describe uses only annotated tags by default. specify the --tags option to make it use lightweight tags as well make sure you've checked out the correct commit (

Get last git tag from a remote repo without cloning

≯℡__Kan透↙ 提交于 2019-11-28 15:57:52
问题 How to get last tag from a (non checked-out) remote repo? On my local copy I use describe git describe --abbrev=0 --tags But I cannot use describe with remote storage 回答1: Use git ls-remote --tags <repository> For example, if we want to know what the latest tag that Git is at we would do git ls-remote --tags git://github.com/git/git.git That returns a long list with all the tags in alphabetical order, as shown below (truncated for sanity's sake). The last line tells us the latest tag is v1.8