Is there an easy way or command to get all git commits up to a specific tag to generate an automatic changelog for a project? I always tag my git repos with a version number like v0.1.0
and for instance would like all commits up to tag v0.1.0
.
I've looked through the docs but don't seem to find a useful option or command for it: http://git-scm.com/docs/git-log (is down at the moment by the way)
For instance:
$ git log --oneline --decorate
Shows the tags next to commits. I'd like the same, but only up to specific tag.
I came up with this modification of the original script. This handles version tags correctly.
For creating changelog by tags, i used this script:
An update to the script suggested by Creotiv to get better sorting of the tags
Just use the tag name as a commit specifier:
git log --oneline --decorate v0.1.0
Just append
tagname
to your command and you should be fine :) I like the--graph
switch to visualize the branches that led to that tag :)You can just do:
... to show every commit up to and including v0.1.0. Of course,
git log
allows also allows you to restrict the commits shown in any of the ways thatgit rev-list
understands, so if you only wanted to see the changes betweenv0.0.9
andv0.1.0
you could also do:Alternative output that might be useful for this purpose is that of
git shortlog
, which groups and summarizes the contributions of each author. Try, for example: