1

I have one type of files which are located in specific folder, called 'testflow'. All files in this folder are text files which are auto-generated by GUI program, and any user can commit changes to this file, which we would like to be able to integrate correctly. The problem is that git is able to do auto merge for this file, but the result is a corrupted file in most cases, as the merge is not trivial, git can't do it correctly. I would like git to let me do a manual merge, as if there is a merge conflict, even if there isn't any actual conflict. Any way to do that? some suggestions I got that aren't helping :

  • define the file as binary
  • ignore the file
  • define merge filter in gitattributes like - doesn't work in case that there are no merge conflicts, it doesn't even trigger the filer.
shlomi
  • 11
  • 1
  • 2
    Maybe consider using `--no-ff --no-commit` for your merge, here you'll be able to inspect your file before it's commited in the merge. ([doc](https://git-scm.com/docs/git-merge#Documentation/git-merge.txt---no-commit)) – Romain Valeri Dec 08 '20 at 08:30
  • 1
    Why is the "define as binary" failing? Perhaps for the same reason as the "define merge filter" failure: that from base to one of the two tips, there are no changes, so that the merge just takes the other tip version. If that's the issue, there's no way to do this other than `git merge --no-commit` followed by manual work. – torek Dec 08 '20 at 08:54

0 Answers0