I have a local file and a corresponding file in a git repository. They aren't in sync so I want to find differences between them but only if a particular line of that file has never existed in the history of the corresponding file in the git repository. For example:
# a.txt (the local file)
foo
bar <- this line has never existed in the corresponding repo
baz <- this line existed but was intentionally removed in the past
# b.txt (the corresponding file in the git)
foo
Then the only difference between files a.txt and b.txt should be bar because baz doesn't exist now but it existed in the past.
I'm looking for an answer how it can be achieved in the simplest way.