Git branches ideally should last for short time, probably for 1-2 days. Then it gets merged into some mainline.
But in some cases, where we work on very big features, we maintain branches. And when 2 or 3 people each work on these very big features in exclusive areas of code, it becomes kinda tough to maintain them.
Amidst hot fixes that go to stable branch, we need to keep these 2-3 big branches in sync with the stable branch. So we end up doing this, quite often.
(in feature-branch1) $ git merge stable
(in feature-branch2) $ git merge stable
(in feature-branch3) $ git merge stable
Is there a right way to maintain these long running branches in git? By doing the above, the git history is kind of messy. These feature branches mostly get pushed to a remote which means that we cannot see rebase
as an option. What else can I do?