Native apps and how to manage web apps efficiently with git

Asked 2 years ago, Updated 2 years ago, 43 views

Currently, we are developing native apps and web apps at ionic.
Native apps and web apps use almost the same source code.
However, only one part of the file is written differently.

Basically, we share the source code, but there is a slight difference between the code of the native app and the code of the web app. What is the best way to efficiently manage it?

If you clone it separately, it's troublesome because you have to modify one of the changes to the other.

Is it okay to create and manage branches for native apps and branches for web apps?
The corrections we share are like cherry-picking.

git

2022-09-30 10:31

1 Answers

I think the ideal is to configure the application so that it can be managed by one branch. (Configure applications to switch environmental differences, for example, settings)

However, there may be times when you really want to manage two slightly different branches.If I were myself, I would do the following.

  • Prepare common, native, web branches
  • Basically committing in common
  • Native/web Each unique code commits to its own branch
  • Periodically merge common branches with native/web branches

In this way, I think you can fully utilize the advantages of git having a graphical commit structure.


2022-09-30 10:31

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.