Git – Best git practices for android project with multiple sets of resources

androidgitversion control

I have a commercial Android project that I have created a client-specific version for (mainly UI tweaks). Since the bulk of the tweaks are in the res/ folder in XML files, we have the changes currently in a branch but I really don't want to have to port changes back and forth between branches in perpetuity. I'm curious if anyone has any source control strategies that will make managing multiple client-specific versions of an Android application as painless as possible.

Also, not sure if this belongs here or StackOverflow. Feel free to transition over there if I guessed wrong.

Best Answer

Have you consider apply a style of programming called FeatureToggle?

The basic idea is to have a configuration file that defines a bunch of toggles for various features you have pending. The running application then uses these toggles in order to decide whether or not to show the new feature.

While is hard, we usually use this style when it´s hard to use branches.

More about this by Martin Fowler. http://martinfowler.com/bliki/FeatureToggle.html

Related Topic