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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:54:02+00:00 2026-06-17T13:54:02+00:00

I just got pretty strange result that I can’t explain I wanted to determine

  • 0

I just got pretty strange result that I can’t explain

I wanted to determine difference between two branches

So i typed

git log master..release1

And I’ve got multiple commits, including let’s say aa11bb22cc33

But then I called

git branch --contains aa11bb22cc33

And I’ve got

release1
* master

How could this happen?!

My git log command by definition should show only those commits that are reachable in release1, but not reachable in master?

I also tried equivalent

git log ^master release1

with the same strange result.

Please explain if you can how is that possible.

P.S. git 1.8.0

  • 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-17T13:54:03+00:00Added an answer on June 17, 2026 at 1:54 pm

    Looking through a few man pages, I think it’s something like this: Even though man gitrevisions says that <A>..<B> is “anything reachable from B but not reachable from A”, just like you quoted, this “reachable” is meant in a strict DAG (directed acyclic graph) sense (i.e. “reachable from” means “is ancestor of”).

    Indeed the git log manpage states that <A>..<B> “shows only commits between the two commits.” The latter also concurs with how the dotdot operator was explained to me: “Everything in B that’s not also in A” (implying A and B are something like branches, which can “contain” commits).

    In the DAG-sense, however, there are no branches, only commits (any branches are only references to commits). So if commit X is “contained in B”, it is actually some ancestor of B, or in other words: it’s reachable from B — because in the Git history graph, every commit has relations (“pointers”, or arrows in a drawn graph) to its ancestor(s).

    Hope this helps.

    Edit: What I forgot to mention is why your commit shows up in the log but branch –contains shows both master and the other branch. I just thought I did know but turns out i don’t after all. If you post a the git log --oneline --decorate --all output showing the concerned branches, I might be able to update my answer with a more concrete explanation 🙂

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

Sidebar

Related Questions

I've got a pretty popular WordPress theme that has a template switcher (basically just
i just got a call from Hosting company, they claimed that my application creates
I just got pagination to work on my site, but I wanted to use
I've got a pretty simple Linq to Sql statement that (on he surface) is
So I've just got myself an Android device and wanted to have a go
This seems to be a pretty strange behavior of CodeFirst, I got a table:
I've got a pretty simple question (and tentative answers), I just want to see
I just read this article and I pretty much got it, although there is
So I just got back for the ACM Programing competition and did pretty well
I just got off a small project using a WCF/REST Web Service that used

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.