Should .last_build_id be commited?

2,664

Solution 1

I do not think it is necessary to commit this. This is kind of like a binary file itself, everytime you make a change and run a program, the file will change. last_build_id should be put into the .gitignore.

Best

Solution 2

Have you a .gitignore-File? If yes, I would prefer to add default gitignore settings for flutter projects in your own gitignore-file.

Here an example how my gitignore looks like for a flotter project (inkl. /ios/Flutter/.last_build_id):

# 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

# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

You can also add specific settings (files or folder) and edit the gitignore. But on this website gitignore.io you can generate a gitignore for flutter with the respective content.

Share:
2,664
Theo Melo
Author by

Theo Melo

Updated on December 20, 2022

Comments

  • Theo Melo
    Theo Melo 11 months

    I was wondering if .last_build_id file should be commited since everytime I'm testing locally it creates a new hash.