Tag graph history isn't linear. People don't just tag baseline (master
).
For example most valuable JS/CSS libraries perform release on branch from baseline to keep clean diff history. They commit release artifacts (compiled/minified JS/CSS) so users may easy grab artifacts without necessity to build. If they tag on master
then master
history will have huge all-on-all diffs on build artifacts.
Real example:
bash# cd js/jquery
/home/user/devel/js/jquery
bash# git remote -v
origin https://github.com/jquery/jquery.git (fetch)
bash# git co master
Already on 'master'
bash# git describe --tags
2.1.0-beta1-590-g47ccf3d
bash# git log --graph --decorate --simplify-by-decoration --oneline --all
* 70605c8 (origin/master, origin/HEAD) Ajax: Only form-encode requests with a body
* 47ccf3d (HEAD -> master) Attributes: do not set properties to false when removing booleans
| * 8339185 (origin/compat) Tests: Make regexes for iOS devices more rigid
| | * f9846ae (tag: 3.0.0-alpha1) 3.0.0-alpha1
| |/
|/|
...
* | 1185427 (tag: 2.1.0-beta1) Tagging the 2.1.0-beta1 release.
Tricks from How to get the latest tag name in current branch in Git? are useless in real world, for:
git describe --tags
I get 2.1.0-beta1 in above example, but most recent effort is 3.0.0-alpha1.
The best way I currently have is reviewing collapsed commit history manually from:
git log --graph --decorate --simplify-by-decoration --oneline --all