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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:51:40+00:00 2026-05-30T21:51:40+00:00

I have a branch which I’ve merged into master. On the branch, git log

  • 0

I have a branch which I’ve merged into master.

On the branch, git log file shows a commit on February 9
On master, git log file does not show the commit on February 9th
On master, git log does show the February 9th commit

The file does not reflect the changes made on February 9th, yet git log shows the commit. It appears git merged in the commit, but didn’t actually apply it to the file. What could be causing this?

Edit: I think I figured out what happened and answered below. I cleaned up the original question for clarity. I had originally written I thought this to be a bug with git, but I don’t think that’s the case anymore. It would be nice, however, if git log file did show these commits to the file. Thanks to everyone who helped, especially Borealid.

Earlier Edit: I genuinely believe this is a bug with git. This file was never renamed, yet git believes that it was, and that is why the commit isn’t being applied. I created another branch, performed the merge, and this problem didn’t occur. I can reproduce the bug on the branches where this occurred. I would be happy to help any git developer debug the problem with me, but I can’t send you my repository.

  • 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-30T21:51:41+00:00Added an answer on May 30, 2026 at 9:51 pm

    Quoted from Dave:

    I’ve recreated a similar situation with the following steps:

    • Create a new git repository
    • Create a file with one line, add it to git and commit (commit #1)
    • Create and switch to a branch
    • Change the file in the branch, commit (commit #2)
    • Switch to master, change the file so there will be a conflict and commit (commit #3)
    • Merge branch into master, the file will be in conflict
    • Resolve the conflict by taking all the changes in master, and rejecting all the changes in the branch. Basically, the file should
      look as it did in master.
    • Add the file and commit the changes (commit #4)

    Now git log will show all four commits, but git log file will only show commits #1 and #3

    The reson that git log -- file only show commit #1 and #3 is because how git-log (default mode) walks the commit chain; when a merge commit is found and there exists a parent commit such that the selected file has the same content after the merge as in the parent commit, git-log will follow (one) such parent and reject all other parents.

    In this case, since the merge conflict is resolved by only keeping changes made in master (the file will have the same content in commit #1 and commit #4) git-log will only walk the master branch.

    In more details: http://schacon.github.com/git/git-log.html (section “History Simplification”)

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

Sidebar

Related Questions

I have some changesets in a TFS 2008 branch which were not merged back
I have a branch called experiment. git checkout master echo 'some changes' > a.txt
I'm using git. I have a branch, apifixes , that was branched from master
I have a repo that I have a master branch which will end up
I have the branch master which tracks the remote branch origin/master . I want
I have a legacy file format which I'm converting into XML for processing. The
I have a Git repository with 'master' branch. Some time ago (few months), we
Theres a file I may have accidentally changed in my branch, which I have
For example I have this commit fa33745860726a363287962232787f23585a46e9 , I want to know which branch
Suppose I have a tracking branch named ' abc ' which tracks origin/master .

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.