Via git rebase
You can handle your specific platform with git rebase instead of git merge . In this case, you can change the main branch and reinstall other branches on it, supporting platform-specific kernel modifications.
Workflow example.
Creating Platform Branches
git checkout master git checkout -b platform1 git checkout master git checkout -b platform2
Make major changes
git checkout master
Make platform changes
git checkout platform2
Import major platform changes
git checkout platform1 git rebase master git checkout platform2 git rebase master
Via git merge
It is also possible to use git merge with the strategy option, as git says in manual merging .
git checkout platform2 git merge -s recursive -X ours master
It will always choose platform-specific changes in case of conflict.
source share