The setup
I have a repository for a project; let's call it foo
.
I have a particular file in the repository; let's call it bar
.
I have two branches in foo
; master
for development and public
for stable releases.
The workflow
I make changes in master
, test them right there, and if they survive the tests, merge them into public
. Assume I am currently working with bar
, a program that shows visual content on the screen, and takes a specific amount of time to run. To cut the runtime during testing, I usually adjust a couple of parameters so it won't run for the complete duration, but only a partial amount.
The problem
There are many changes I make in master
that I would like public
to reflect; however, in master
, I don't want to have to change all the parameters back to the default user-facing ones right before (or after) I merge. I know [1] the lines at which these parameters exist, and, optionally, [2] a list regex patterns, one of which these lines would match.
Is there a way I can configure git-merge
for this particular repository to merge always as ours
for those particular lines, so that my parameters and configurations don't get overwritten?