0

The issue I'm facing is I'm working on a Flutter application that's going to be used by clients (schools). Some clients requested to have their own separate apps, with exactly the same functions as the main one, but with different name, different server, different FCM, etc.

I tried solving this by making a branch for each client (luckily there aren't many, fewer than 10). So what will be happening is once I make changes or new features to the main app (at master branch), I'll have to make the same changes to the other apps (at other branches), and I'm wondering if I could be able to pull the changes from the master to the other branches locally by a simple command?

git pull origin master

This commands pulls the changes from the remote master branch to the local master branch, but I want to pull the changes from the local master branch to the other local branches. How to do that? Is it possible?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Simou
  • 682
  • 9
  • 28
  • 2
    I don't think so. A pull is a fetch and _a merge_. – evolutionxbox Nov 01 '20 at 12:34
  • 1
    You could rebase each of your specific app branches onto the trunk, but that will likely lead to a lot of conflicts to resolve. Given that the functionality is the same I'd recommend looking into how you can externalise what's varying to simple configuration, so you don't need to maintain separate branches – jonrsharpe Nov 01 '20 at 12:36
  • 3
    You should not use multiple branch for that usage. I recommend to keep one main branch and add a configuration system to specify different name, logo or design or as well activate features...etc If you use branch, it will become quickly very hard to maintain/merge for a lot of reasons... – Calumah Nov 01 '20 at 12:43
  • I second @Calumah. Try to use a configuration file with different versions of it for each client. I believe Flutter has this capability. – TTT Nov 01 '20 at 20:50
  • @Calumah but does this configuration file allow changing the package name? as you know i can't upload multiple apps to playstore with the same package name... – Simou Nov 02 '20 at 09:07
  • Don't know much about Flutter but I found https://stackoverflow.com/a/52475394/1079254 so I think you can manage separated configuration pour each package with this param – Calumah Nov 02 '20 at 09:22

0 Answers0