Context: I am trying to get git behave like some other source code management tool while trying to convince them to only use git. In the meantime I need to run git as a slave, doing all the same things as the scm in action.
How can I force git to use the strategy -X theirs
on file level instead of hunk level?
Basically if I have two hunks from two branches in the same file, git is capable to merge those to include both. But instead of that I want to overwrite the whole file of mybranch
with the file of theirbranch
.
EDIT:
Same can be done the other way round, to merge with strategy -X ours
on file level and overwrite changes on theirbranch
if there are changes on the same file on mybranch
.