user1261710 user1261710 -4 years ago 113
Git Question

Which files generated from Ionic do I include in source control?

I used this command to generate a new blank Ionic project:
ionic start newapp blank --v1

I have the following files and folders generated:

enter image description here

I am not sure which ones I should be including or excluding from source control.

Answer Source

I like the layout that Ionic themselves follow on their example apps:

resources/
src/
www/
.editorconfig
.gitignore
config.xml
ionic.config.json
package.json
tsconfig.json
tslint.json

This removes the clutter of node_modules that can be rebuilt with npm install and the platform and plugins directories that can also be rebuilt.

If you want follow this layout, your .gitignore could look like this:

.sass-cache/
.tmp/
.versions/
coverage/
dist/
node_modules/
tmp/
temp/
hooks/
platforms/
plugins/
plugins/android.json
plugins/ios.json
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download