2

I want to be able to track changes to local config items like web.config transforms in the local repository branch but exclude them from the master branches during pull requests.

I'm hoping I can just flag the files somehow to be ignored by pull requests but not commits.

I know that I can pick and choose commits for a pull request but that would be extremely error prone in a busy environment.

Philip Pittle
  • 11,821
  • 8
  • 59
  • 123
m12lrpv
  • 997
  • 2
  • 11
  • 18
  • One normally tags only *commit* objects, but it is possible to tag a blob. That won't make any difference for commits and merges, i.e., it won't help you achieve your goal here. – torek Mar 05 '18 at 23:10

1 Answers1

1

exclude them from the master branches during pull requests

No unless you create a dedicate branch for that PR, and delete the file in it.

Another approach is to not version that file at all, only a template file, and values files, in order to generate on checkout the actual config file: since the config file remains private (not generated), it won't be part of any PR.
See "Avoiding merge conflicts when merging master into per-host customized branch" as an example.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250