Why ios/build folder is not included to .gitignore file?

220

As mentioned in gitignore:

If there is a separator at the beginning or middle (or both) of the pattern, then the pattern is relative to the directory level of the particular .gitignore file itself.

Otherwise the pattern may also match at any level below the .gitignore level.

Once you have changed the pattern to build/, don't forget you also have, to validate if that works:

git check-ignore -v -- ios/build/aFile

That should print the .gitignore rule line, which does ignore the folder.

Share:
220
Akbar Pulatov
Author by

Akbar Pulatov

Engineer of Embedded Systems

Updated on January 01, 2023

Comments

  • Akbar Pulatov
    Akbar Pulatov 10 months

    Why ios/build is not included to gitignore by default?

    Untracked files:
      (use "git add <file>..." to include in what will be committed)
            ios/build/
    

    /.gitignore file

    # Miscellaneous
    *.class
    *.log
    *.pyc
    *.swp
    .DS_Store
    .atom/
    .buildlog/
    .history
    .svn/
    
    # IntelliJ related
    *.iml
    *.ipr
    *.iws
    .idea/
    
    # The .vscode folder contains launch configuration and tasks you configure in
    # VS Code which you may wish to be included in version control, so this line
    # is commented out by default.
    #.vscode/
    
    # Flutter/Dart/Pub related
    **/doc/api/
    **/ios/Flutter/.last_build_id
    .dart_tool/
    .flutter-plugins
    .flutter-plugins-dependencies
    .packages
    .pub-cache/
    .pub/
    /build/
    
    # Web related
    lib/generated_plugin_registrant.dart
    
    # Symbolication related
    app.*.symbols
    
    # Obfuscation related
    app.*.map.json
    
    # Android Studio will place build artifacts here
    /android/app/debug
    /android/app/profile
    /android/app/release
    
    /lib/credentials.dart
    

    /ios/.gitignore file:

    *.mode1v3
    *.mode2v3
    *.moved-aside
    *.pbxuser
    *.perspectivev3
    **/*sync/
    .sconsign.dblite
    .tags*
    **/.vagrant/
    **/DerivedData/
    Icon?
    **/Pods/
    **/.symlinks/
    profile
    xcuserdata
    **/.generated/
    Flutter/App.framework
    Flutter/Flutter.framework
    Flutter/Flutter.podspec
    Flutter/Generated.xcconfig
    Flutter/app.flx
    Flutter/app.zip
    Flutter/flutter_assets/
    Flutter/flutter_export_environment.sh
    ServiceDefinitions.json
    Runner/GeneratedPluginRegistrant.*
    
    # Exceptions to above rules.
    !default.mode1v3
    !default.mode2v3
    !default.pbxuser
    !default.perspectivev3