Search code examples
gitreact-nativegithubversion-control

Application management


I have a react-native app that I'm planning to deploy to the stores. I have a private github repo for this app, my question is how can I keep track/copy of all my live updates on github? (github release doesn't work for me, I don't want to download the source code, I just want to have access to it anytime I need). Lets say I create a final production branch (main) on 12/20/22 and I build the apps for stores from this branch, I continue to work on the app and a couple of weeks later I merge new changes to the main branch to create a new production build, but my app from 12/20/2022 suddenly crashes, I need to go back to the 12/20/22 code and test it in order to fix the bug and send the updates over the air (expo). I thought of creating a copies of the main branch every time I create a new production app (like copy-1220222), but over the time there will be a lot of copies and I don't think that's a good solution. What is the best approach to keep the live codebase untouched?


Solution

  • creating a copy branch every time I build a new app also is not an option because then I'll have a lot of copy branches in my repo

    That is true with Subversion, not Git.
    The best practice remains to use tags, which, combined with GitHub Release, allows you to browse the code at a specific point in time.
    Each tag does not represent an additional copy, just a pointer to your codebase state (a specific commit) in its history.

    But you need also to store the React application built to a deliverable referential like a Nexus instance (as described here) in order to be able to associate said code with a delivery, making sure to know what cas built from which code.