Should .last_build_id be commited?

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


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.

Tags:

Git

Flutter