0

I have checked out a very old feature branch and would like to rebase master.

However, there are webpack build files that aren't included in .gitignore which causes the rebase to prompt me to resolve conflicts for every commit of the feature branch for these webpack build files.

My question is, is there a way to ignore these webpack build files conflicts?

deymbwoi
  • 125
  • 3
  • 10
  • Not really, no. You could write a *merge driver* that uses `theirs` (not `-X theirs`, just `theirs`) , which would mostly kinda sorta work sometimes, and use your `.git/info/attributes` file to call it up. But since it only kinda sorta works, and then only sometimes, it's still the wrong way to go. – torek Dec 05 '22 at 08:17
  • 1
    The *right* way to go (rather more painful of course) is to rewrite history so that there are no committed build files. Then the problem never comes up in the first place, and the repository doesn't grow fat with build products either. But if the pain is too great and you want to attempt the merge driver method, search for "git merge driver theirs". – torek Dec 05 '22 at 08:19
  • How many commits are there? Can you re-generate the generated files? Then you could simply do `regenerate; git add file; git rebase --continue` a bunch of times. – knittl Jan 14 '23 at 10:17

0 Answers0