Questions tagged [git-describe]
44 questions
3
votes
0 answers
Git describe on a shallow clone is nondeterministic
I have a git repo where feature branches are merged into a master branch, and there are version tags on some of these merge commits. Jenkins builds the master branch from a shallow clone, but needs to use the version numbers in the tags, so there's…

Dániel Szoboszlay
- 548
- 4
- 7
3
votes
2 answers
How to make git describe use semver compatible tags only
I want my git describe invocation to use only refs
that conform to semantic versioning.
To keep it simple, for now, I do not care about other options
(like annotated tags only, branches, candidates, ...).
Example:
I have tagged an early/old commit…

hoijui
- 3,615
- 2
- 33
- 41
3
votes
1 answer
Why does `git describe` show "warning: tag 'xxx' is externally known as 'refs/tags/xxx'"?
I am trying to use git describe to retrieve the latest tag name for the current branch, but I'm facing unexpected warnings in the output.
-> git describe
warning: tag 'v0.0.6' is externally known as 'refs/tags/v0.0.6'
refs/tags/v0.0.6-0-g5392899
->…

trebor
- 903
- 1
- 12
- 23
2
votes
2 answers
GIT get first tag per file in current state
To compare individual files between many releases, I want to keep track of the first release where a file has changed, per file.
I want to log the first tag for a file in git in the current state, since the last change.
For example, I have two…

Rob Audenaerde
- 19,195
- 10
- 76
- 121
2
votes
0 answers
Why is the output of 'git describe' different from one build to another?
I have a local git repo with the following files:
# .gitlab-ci.yml
image: alpine:latest
before_script:
- apk update
- apk upgrade
- apk add bash
- apk add git
qa_build:
environment:
name: qa
tags:
- docker
stage: build
…

Craftonix - AA
- 410
- 5
- 13
2
votes
1 answer
git describe: inexplicable commit count
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…

Andre Loker
- 8,368
- 1
- 23
- 36
2
votes
1 answer
Git describe giving different tags
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…

Parvinder Singh
- 1,737
- 2
- 12
- 17
1
vote
2 answers
How to get individual elements of $ git describe?
We are working on a versioning system based on git tags.
While git describe is great, we would prefer commands that output the three elements of git describe seperately (latest tag, commits since tag, commitId) e.g. TAG 12 gff9fd30. We managed…

Meister der Magie
- 99
- 1
- 6
1
vote
1 answer
When and why exactly does git describe not show the latest tag?
I have three branches: dev, staging and master. When I do git describe the result is v0.1 no matter which branch is checked out.
Following I will describe a workflow of making changed to dev adding a version tag and merging to staging and to master…

zlZimon
- 2,334
- 4
- 21
- 51
1
vote
1 answer
git tags are not recognized anymore
I got a weird problem with my git repository. It suddently "stopped" working with tags. I can create tags, i can list tags. I can even use git checkout $tag or git logs $tag. But when using git describe --exact-match the tag is not detected anymore?…

Sven Eppler
- 1,646
- 1
- 15
- 26
1
vote
0 answers
Pass gitlab CI/CD predefined variable as an argument to .pri file in Qt
I have a .pri file in the QT application, where it gets the git lighweight tag from the system.
This is the .pri file in the Qt application.
Version = $$system(git describe --tags)
I have a docker container created for this application. This…

user2301
- 1,857
- 6
- 32
- 63
1
vote
1 answer
Git describe conditional fatal error in FOR /F command
This is a weird one. The code below works as expected inside a batch file:
FOR /F "tokens=1,2,3,* delims=-" %%G IN (
'git describe --long --always --dirty --broken'
) do (
set tag_name=%%G
set versions_from_tag=%%H
set hash=%%I
…

Rick
- 1,240
- 14
- 21
1
vote
1 answer
JGit equivalent for git commits since last tag command
Given this git command git log ``git describe --tags --abbrev=0``..HEAD --oneline
I'd love to have the equivalent in JGit.
I found methods like git.log().addRange() but could not figure out what kind of values it expects or where I can make a call…

xetra11
- 7,671
- 14
- 84
- 159
0
votes
1 answer
Including Git tags in Visual Studio application
I'm looking for a simple way to include the output of git describe --t --dirty in the title bar of a WPF program.
I've looked at MSBuild.Community.Tasks but I don't understand the build process too well. I haven't been able to find much recent…

Droidling
- 1
- 1
0
votes
0 answers
Maven git describe without tags
We're using the Maven plugin git-commit-id-maven-plugin and want to make both hash and dirty status available to our build. Our plugin:
io.github.git-commit-id
git-commit-id-maven-plugin
…

Halvor Holsten Strand
- 19,829
- 17
- 83
- 99