There are changes in Git's history, but the final result is wrong. What could be the reason?

the real file is too large, so the simplification goes something like this:

version 0: there is a file a.txt , in which there is a more characteristic line. This is the only place in the whole file, and there is no repetition. Suppose it is old

.

version 1: someone in this commit has changed old to new

version 2 (final version): in this file, old is still old .

the three versions here are just examples. In fact, the commit is far away from many individual commit, and is not a single branch, there are a variety of merge operations.

I want to figure out why the changes to version 1 are not included in version 2, so git log-p a.txt > > log.txt , then look for old in the log.txt file, and only one change can be found:

- old
+ new

and one of the earliest additions:

+ old

that is, what has been modified in a commit is not reflected in the final file

what are the possible reasons for this situation and how to investigate it?

Git
Oct.29,2021

try using gui to check it out.
gitk path / file name

Or use git blame to see where old came from.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eae31d-47f8c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eae31d-47f8c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?