I like gitlab over github, but still, some sort of version control is absolutely the best way to go here.
Security in Ionic apps is interesting, in that the entire process of distributing your app binary effectively publishes the app source. Leaving copyright concerns out of it, I take the position that I should be able to store everything needed to build the app absolutely anywhere. If there is need to hide secrets that are baked into an Ionic app, that represents a major design problem. All secrets and security need to be delegated to servers under your control that live outside the place the Ionic app is running.