I have a project targeted to multiple platform. I have to change UI codes for different platform while keeping core classes same. To achieve this, I thought to make git branches for different platform.
Given the above scenario my requirement is, if I make changes in core classes it should be reflected in all git branches.
How to achieve this?
Or is there any other workflow to achieve the same?
Via
git rebaseYou may handle your specific platform via
git rebaseinstead ofgit merge. In this case you will be able to change core branch and than rebase other branches on it keeping platform specific modifications applied over core.Example workflow.
Make platform branches
Make core modifications
Make platform modifications
Import core changes in platforms
Via
git mergeIt is also possible to use
git mergewithstrategyoption as said in git merge manual.This will always choose platform specific changes in case of conflicts.