Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6784839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:02:57+00:00 2026-05-26T17:02:57+00:00

I want to use git log to get a list of changes starting with

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:02:58+00:00Added an answer on May 26, 2026 at 5:02 pm

    Try git log --first-parent --oneline -n 6 yourtag, modified to suit your needs. From the Git log manual:

    –first-parent

    Follow only the first parent commit upon seeing a merge commit. This option can give a better overview when viewing the evolution of a particular topic branch, because merges into a topic branch tend to be only about adjusting to updated upstream from time to time, and this option allows you to ignore the individual commits brought in to your history by such a merge.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use git log to show all commits that do not match
I have a transaction log file in CSV format that I want use to
I use git log, but I find it can only list logs under current
I want to get a list of all the branches in a Git repository
I want to use opendiff as default diff-tool for git diff. This used to
I don't want to submit projectname.project folder. Now, I use like that git add
I tend to use the bisect command in git extensively. Now I want to
I'm a Ruby on Rails developer and want to use Git for my next
A noob here. I have a personal Macbook and I want to use Git
I am trying to get a list of branch heads in Git. So far

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.