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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:35:36+00:00 2026-05-27T17:35:36+00:00

Given that there is a tree depicted as below: d1a–d1b—d1c–d1d–d1e <dev> / / \

  • 0

Given that there is a tree depicted as below:

        d1a--d1b---d1c--d1d--d1e     <dev>
       /                /      \
a--b--c---d---e--------f---g----h--i <master>

a is the oldest commit, while i is the latest one, the HEAD
d1a is branched off master to a new branch dev, added some new changes and merged changes from master (from f to d1d), and then eventually merged back to ‘master’ at h.

When doing git log/rev-list, how do I select:

  1. all commits from HEAD to e:
    i, h, g, f, e, d1e, d1d
  2. all commits from HEAD to g:
    i, h, g
  3. all commits from HEAD to d1b:
    i, h, g, f, d1e, d1d, d1c, d1b

Many thanks in advance for any pointers/suggestions/hints!

  • 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-27T17:35:37+00:00Added an answer on May 27, 2026 at 5:35 pm

    From man git-rev-parse:

    SPECIFYING RANGES
       History traversing commands such as git log operate on a set of commits, not just a single commit. To these
       commands, specifying a single revision with the notation described in the previous section means the set of commits
       reachable from that commit, following the commit ancestry chain.
    
       To exclude commits reachable from a commit, a prefix ^ notation is used. E.g. ^r1 r2 means commits reachable from r2
       but exclude the ones reachable from r1.
    
       This set operation appears so often that there is a shorthand for it. When you have two commits r1 and r2 (named
       according to the syntax explained in SPECIFYING REVISIONS above), you can ask for commits that are reachable from r2
       excluding those that are reachable from r1 by ^r1 r2 and it can be written as r1..r2.
    
       A similar notation r1...r2 is called symmetric difference of r1 and r2 and is defined as r1 r2 --not $(git
       merge-base --all r1 r2). It is the set of commits that are reachable from either one of r1 or r2 but not from both.
    
       Two other shorthands for naming a set that is formed by a commit and its parent commits exist. The r1^@ notation
       means all parents of r1. r1^! includes commit r1 but excludes all of its parents.
    

    There is even an example, so I’d RTFM 😉

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

Sidebar

Related Questions

Is there an algorithm that with a given 2-3 tree T and a pointer
Given that there are many sizes and color depths for different phones (even for
This is not a technical question, but given that there are a few iPhone
Original Problem: I have 3 boxes each containing 200 coins, given that there is
Is there a way to read a locked file across a network given that
What alternatives are there to GAE, given that I already have a good bit
Is there an easy way to verify that a given private key matches a
Is there any possibility that GetPropInfo returns nil even if the given class is
Is there a built in Java code that will parse a given folder and
Is there a built-in function/method that can check if a given string is a

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.