# How to version control native app and web app by git

**URL:** <https://forum.ionicframework.com/t/how-to-version-control-native-app-and-web-app-by-git/129237>\
**Category:** ionic-v3\
**Created:** [April 29, 2018, 4:14am UTC](https://forum.ionicframework.com/t/how-to-version-control-native-app-and-web-app-by-git/129237 "2018-04-29T04:14:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nakamurakota](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/nakamurakota/32/118940_2.png) [@nakamurakota](https://forum.ionicframework.com/u/nakamurakota)\
**Post date:** [April 29, 2018, 4:14am UTC](https://forum.ionicframework.com/t/how-to-version-control-native-app-and-web-app-by-git/129237/1 "2018-04-29T04:14:46Z")

</div>

With ionic, I develop native applications and web applications.

Basically it is the same source code, but there are also differences.

In this case, how should we manage the version of the WEB application of the native application?

Adding the fixes made to the native application to the WEB application manually, work like something will cause mistakes and it is a messy problem.

Version control uses git.  
Is it better to create branch for native applications and branch for web applications, and use cherry - pick to change shared parts?

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [April 29, 2018, 6:26am UTC](https://forum.ionicframework.com/t/how-to-version-control-native-app-and-web-app-by-git/129237/2 "2018-04-29T06:26:15Z")

</div>

A couple of thoughts about that in the following post:

> [@\[SOLVED\]\[PWA\] Cordova & PWA: code, branch, design and index.html](https://forum.ionicframework.com/t/solved-pwa-cordova-pwa-code-branch-design-and-index-html/126225/8):
>
> After playing a bit I gonna follow the way we discussed 1 git repo aka 1 single branch Gulp scripts to switch the configuration between Cordova and PWA Kind of factory patterns to handle the code Some more explanations and details: Configuration and index.html Firstly I have noticed that using this.platform.is('cordova') to switch between Cordova or PWA isn’t really reliable for test purpose. Sometimes the Chrome debugger load a Cordova app when I was expecting a PWA (some refresh/redirect…

---

<div class="post-metadata">

**Author:** ![nakamurakota](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/nakamurakota/32/118940_2.png) [@nakamurakota](https://forum.ionicframework.com/u/nakamurakota)\
**Post date:** [April 29, 2018, 8:07am UTC](https://forum.ionicframework.com/t/how-to-version-control-native-app-and-web-app-by-git/129237/3 "2018-04-29T08:07:36Z")

</div>

Thank you! I will use this!

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:38pm UTC](https://forum.ionicframework.com/t/how-to-version-control-native-app-and-web-app-by-git/129237/4 "2021-07-19T21:38:24Z")

</div>

Closed on July 19, 2021, 9:38pm UTC


