I'm building a hybrid mobile app that has slightly different versions but share 99.9% of the code. There is a paid and free version, which differ in one function only. Also there is a slight difference between the iPhone and Android versions.
I have the code in a git repository but I don't want to replicate the repo 4 times and work on changes to the code 4 times, makes no sense.
So I'm looking for a way of having "sub-repos" that could share most of the code and could be easily switched to have the custom parts overridden. Any ideas what should I use?