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 7971801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:42:48+00:00 2026-06-04T07:42:48+00:00

I’m trying to understand the relationship between two git commits that are some distance

  • 0

I’m trying to understand the relationship between two git commits that are some distance apart in git spacetime. They both touch the same piece of code, but somewhere along the line for one of them, the code got moved to a different file.

What I think I want to do is this: view a simplified git log that shows ‘key’ commits. Initially, this would be revision A, revision B, and their common ancestor. But, as I identify other relevant commits, I’d also like to be able to see those, in something like the git log --graph format.

Issues so far:

  1. git log --all A...B starts at B, shows many commits, and I’m not sure what the significance of the final commit it shows is. (It’s not A)
  2. I can’t work out any way to filter down the huge number of commits. --simplify-by-decoration helps in other cases, but not here (eg, it doesn’t show the actual commits I specified).

Sorry if this isn’t clear. It’s not easy to explain the kind of information that would be helpful until you see it.

EDIT

Ok, I’ll try and spell it out. Call the target commits a123 and b234, with c345 another ‘key commit’ I’ve identified, and d456 is the common ancestor:

git log <something>  a123 b234 c345

d456
| |
| c345 <description, diff of key file>
| |
| b234 <...>
|
a123
  • 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-06-04T07:42:49+00:00Added an answer on June 4, 2026 at 7:42 am

    It sounds like you’re looking for the pickaxe (git log -S"code to search") or blame (git blame -C file).

    See also: http://jfire.io/blog/2012/03/07/code-archaeology-with-git/

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace

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.