简体   繁体   中英

Git Merge Original Repo into Fork

I want to manage a few apps for different customers. I want to fork them from a mother project that has all key features every customer needs. I will use the forks to customize the different apps, brand them and sometimes add specific features. Now I would like to add some new key features, eg Apple Watch support or anything else that is asked for every fork.

So my question is: Is there a way to do add the new features to the mother app and push the changes to the forks? Or do I have to work with branches and push the mother branch into the heirs?

Thank you for your help! :)

You can do it as library as suggested in another answer. Real git way is this:

  • At first setup your master to track to remote original repo master.
  • Than pull original master.
  • Checkout your custom branch
  • make rebase with branch master
  • now your custom branch contain new possibility from mother project and you can push custom branch to its custom repo

You can do this by creating a library with all of the common features between all variations of the app. The library can be in its own repo with separate repos for each variation. This is by far the best solution, in my opinion, since you can make changes to the library independently from the individual apps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM