Merger
You can join instead of rebase. Since your combined affiliate is for testing purposes only, you donβt have to worry about the story being a bit messy.
I.e:
git checkout feat2 git branch -b combo git merge feat1
Later, when you update feat2:
git checkout combo git merge feat2
Whenever you do an update for feat1 or feat2, combine this into a combo.
The disadvantage is that you have to merge all the commits in both branches. If you do not need changes, you will have to make a separate commit that removes these changes in the combined branch.
relocation
You can reinstall additional commits from feat2 to combos.
Suppose you add some commits to feat2, then move these commits to combos:
git rebase --onto combo lastcommittoexcludeonfeat2 feat2
Also, before making changes to feat2, add a branch or tag, for example:
git checkout -b lastfeat2rebase git checkout feat2 git commit ...
Please note that once you go with the rebase option, you can no longer use the merge option. If you use the merge option, you can go to the reinstall option later.
source share