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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:26:30+00:00 2026-05-27T04:26:30+00:00

I need to know why two commits are different. I have two commits, e2383d

  • 0

I need to know why two commits are different. I have two commits, e2383d and 2c44ab, which are, apparently, since they have different hashes, different.

First, I know about git diff, and currently, I am trying git diff e2383d 2c44ab. It returns successfully, with no output. The two commits have:

  • The same commit message
  • The same author
  • The same commit date (editted: sorry, just the date, see my answer below)
  • The same parent
  • The same contents, as far as I can tell.

Basically, my tree looks like this:

* ← stuff based on that commit
| * ← e2383d
* | ← 2c44ab
|/
* ← the common parent

I’m about to eliminate e2383d, but before I do, I’d like to make sure there isn’t something important there. My understanding of git, however, was that if two “commits” were the same, they’d have the same hash, and thus my situation would not exist unless there was a difference between the two.

Another thing I’ve tried:

% diff <(git show 2c44ab) <(git show e2383d)  
1c1
< commit 2c44ab...
---
> commit e2383d...

Forgot that commits have >1 date on them. The following command showed (for me) the difference between my two commits:

% diff <(git show --pretty=fuller 2c44ab) <(git show --pretty=fuller e2383d)
1c1
< commit 2c44ab96bde429c9f345d8a12dfcf2278faa9333
---
> commit e2383d3164589bb3a8a679c9cb6bbe93ea41e2ee
5c5
< CommitDate: Wed Nov 23 17:06:40 2011 -0800
---
> CommitDate: Mon Nov 28 11:41:26 2011 -0800

The commit date for Monday, was the time at which I did a rebase. Now, why does git store this — seems to defeat the “These are the same commit, I’ll fold them” behavior I expected.

  • 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-27T04:26:31+00:00Added an answer on May 27, 2026 at 4:26 am

    Two commits may have the same tree but different metadata. Any time a commit is amended, rebased, or cherry picked, the commit date will be updated and a new commit is written.

    If git says that the diff between commits A and B is empty, but you’re still unsure, you can verify for yourself that they point to the same tree with

    git rev-parse A^{tree} B^{tree}
    

    which will list the names of their tree objects, or with

    git cat-file -p A
    git cat-file -p B
    

    which will show the raw commit objects to you.

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

Sidebar

Related Questions

i have two dates ValidFrom : 20-04-2010 validTo : 02-05-2010 i need to know
`I need to know if two references from completely different parts of the program
I have two different things to happen at once.., basically I need to insert
I need to know about Epoll On linux System. Could you recommend manual or
I need to know how the performance of different XML tools (parsers, validators, XPath
Say I have two tables, users and groups each of which has an auto-incrementing
I need to know if two NSDate instances are both from the same day.
I have two paths, let's say: rootfolder1 rootfolder2 While the folder names are different,
Ok, so for a program I need to know two facts, the length of
I currently know two ways to construct singletons in JavaScript. First: var singleton =

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.