We have a file that is usually being generated automatically, and therefor it has a comment in the beginning of the file indicating the date of when the file was generated, i.e:
// generation date 01/10/2020
When we use git rebase, between two branches that have modified this automatically generated file (either manual change, or maybe regenerated the file), even if all the content of the file is the same between the two branches - except the specific date comment in the beginning of the file - git marks this as conflict, and it is really annoying (because there are many files like that, not only one).
I would like to have git automerge this specific conflict. Maybe by providing a certain regex so if the conflict matches the regex, git can take for instance the other branch's version (because we don't really care about the date during merging).
I know we could just not generate this comment - and then avoid future conflicts, but we would like to keep the date comment.
We are using different tools in order to merge, so we prefer a git solution, and not tool specific solution.
Any ideas on how to solve our problem?
Thanks.