I want to use git log to get a list of changes starting with a tag and going back, say 6 commits
git log --format="%h %ad %d %an: %s" --tags -n 6 --date=short
this will give me the last 6 commits, but ideally I would like to get a range that is in the past;
given the following
x---y(tag101)---z---branch
/
aa---bb---a---b---c---d---e---f---g(tag102)---h---HEAD
is it possible to get logs for tag101 and back 6 commits
y(tag101)
x
a
bb
aa
or for tag102
g(tag102)
f
e
d
c
b
most of the time when I am trying to get this information I am actually checkout on a tag and in detached HEAD state
I’ve tried a few different things, such as
git log tags/tag101..96c06be --format="%h %ad %d %an: %s" --tags -n 6 --date=short
this just seems to return commits starting from the last one made, ignoring the specified tag
Try
git log --first-parent --oneline -n 6 yourtag, modified to suit your needs. From the Git log manual: