Lets consider
file.txt
aaa
bbb
ccc
In branch A, I'm changing file content
file.txt
aaa-update
bbb
ccc
In branch B, I'm changing file content
file.txt
aaa
bbb
ccc-update
When I merge branch B into branch A I get below content.
file.txt
aaa-update
bbb
ccc-update
But i need git to return the operation as modified.
Similar question: avoid auto merging of git conflicts and warn if same files getting modified in different branches
I'm not sure if any merge strategy or merge driver ca help here.
Update: I need to use this logic in a software.