Search code examples
angularcordovaionic-frameworkcapacitor

what files/folder must be gitted in a ionic project


what files/ folder must be gitted in a ionic project ?

I am a newbie in ionic development and dunno in all these files of a project what is sufficient to keep in a github depot, while some other files can be regenerated if needed during the build command.

enter image description here


Solution

  • Ionic comes already with a .gitignore file which states which files will be ignored. With this default file, you will, for example, not commit folders such as node_modules which can be regenerated with a simple npm install

    P.E An example .gitignore from an Ionic Project

    # Specifies intentionally untracked files to ignore when using Git
    # http://git-scm.com/docs/gitignore
    
    *~
    *.sw[mnpcod]
    .tmp
    *.tmp
    *.tmp.*
    *.sublime-project
    *.sublime-workspace
    .DS_Store
    Thumbs.db
    UserInterfaceState.xcuserstate
    $RECYCLE.BIN/
    
    *.log
    log.txt
    npm-debug.log*
    
    /.idea
    /.ionic
    /.sass-cache
    /.sourcemaps
    /.versions
    /.vscode
    /coverage
    /dist
    /node_modules
    /platforms
    /plugins
    /www