How to force git merge to generate conflict on all file or all file that differ to generate conflict having whole old and whole new version, example of such file :
<<<<<<<<<<A
A
B
C
D
OLD
OLD
OLD
E
F
G
...
Z
============
A
B
C
D
NEW
NEW
NEW
EEEEEEE
FFFFF
GGG
...
Z
>>>>>>>>>>B
The idea is that I would like to merge manually having whole contents of two files, no metter if lines are identical or one branch is inheriting from whole previous, example:
$ echo ABC > file
$ git add file
$ git commit -m '+) file = ABC'
[master 6e91bce] +) file += ABC
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file
$ git checkout -b new_branch
Switched to a new branch 'new_branch'
$ echo DEF >> file
$ git add file
$ git commit -m '+) file += DEF'
[new_branch 27e29bf] +) file += DEF
1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout master
Switched to branch 'master'
$ git merge --no-ff new_branch
Automatic merge went well
$ cat file
ABC
DEF
I understand the reason why git
automatically addded "DEF" to "file". But I would like a way to force git "to think" :
- master/file and new_branch/file differs
- I will make a conflict with whole OLD and whole NEW version to let my users to manually resolve it
I've read other posts about making "merge driver", but it's far from clear to me how to make git using it. (Script is obvious, just a few lines).
P.S. For interested people: I do not use any merge tool. I'd like to merge TSV spreadsheets with DataSets and ResultsSets. In all cases when they differ (even if it's edit only on one branch), I'd like to process them manually with my own toolchain for processing those DataSets.