Reputation: 13
There is some git repo that's upgrading almost everyday.
I need to modify some of the core functions, plenty of them, but don't know how to avoid doing conflict-solving merges by hand every time original repo is changed.
Is there's some optimal practice available?
Upvotes: 1
Views: 30
Reputation: 142164
Yep there is a way to auto-resolve conflicts in GIT. Its called git rerere
rerere = Reuse Recorded Resolution
When enabled the rerere simply "record" the way you resolved the conflict (creating patch file) and this file will be used to auto merge the same conflict when git see it again.
As best practice if you know in advance that you are going to do a massive refactor of old code - you should do it in small chunks as mush as possible in order to bypass the massive merges later on.
Read more here
Upvotes: 2