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

  • Home
  • SEARCH
  • 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 7171943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:30:52+00:00 2026-05-28T15:30:52+00:00

I seem to have run into a case where git doesn’t notice inline changes

  • 0

I seem to have run into a case where git doesn’t notice inline changes when merging..

My master branch had a file with this line:

process &block if block

And I did a fetch from a git repo, and tried to merge in the changes from the same file, which had a line with:

process 1, &block if block

But git didn’t give a warning about a possible merge conflict, and didn’t highlight the line as changed [1]. The change was simply ignored, not updating the file with the line [2].

Why did git not notice this inline change? And update the line (since the line was from a later commit)?

EDIT:

[1] – git didn’t indicate that it had changed when I was doing the conflict resolution (you know, it didn’t put in “<<<” in the source code around it). And the succeeding merge commit doesn’t show the line as changed in any way (either when running gif diff with colors or looking at the code on github).

[2] – The line came from a repo which held a newer version of the same gem I was working on (so there should be some common commit ancestors with which to do the merge. Also, the line was updated in a later commit on that same repo, so it should be apparent for git that that was in fact an update).

EDIT:

In case it plays a role, this was the commit tree before the merge:

The original gem (common ancestry):

--A

My master branch (actually a fork of the original gem):

--A--  
     \  
      --B  

(the line wasn’t changed in B, but came from A)

The repo I merged into master (the updated version of the gem):

--A---C---D

(the line was updated in D)

  • 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-28T15:30:53+00:00Added an answer on May 28, 2026 at 3:30 pm

    Merge, git or otherwise (sans bugs or incomplete implementations), works by looking up most recent common ancestor of the two branches and than combines changes since that point. It is only a conflict if both sides changed the line (in different way). If only one side changed it, that change is applied.

    In git, you can see changes from merge base to the branch head you want to merge using git diff HEAD...branch and changes from merge base to your local head using git diff branch...HEAD (generally, git diffleft...right shows changes from common ancestor of left and right to right). The commands are for before you do the merge. After the fact, it would be git diff HEAD^..HEAD^2 and git diff HEAD^2..HEAD^ (HEAD^ is first parent, HEAD^2 is right parent).

    You can also see all revisions since the merge base by replacing git diff with gitk in above commands or just ask for what the mere base is using git merge-base HEAD branch.

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

Sidebar

Related Questions

I have the following sample code which doesn't seem to want to run. import
I have been recently learning some OOP PHP and seem to have run into
I seem to have run into a strange issue whereby a string reference is
I am working on my second Facebook App and seem to have run into
I'm building a database and have run into a problem that I can't seem
Ruby doesn't seem to have a facility for defining a protected/private block like so:
I'm learning Javascript and CSS and have run into an issue where my CSS
I have run into this issue several times in the past and would like
I have run into an interesting problem which I'm pretty sure is the fault
I seem to have a problem with this SQL query: SELECT * FROM appts

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.