Open
Description
We should have a standard and consistent .gitignore
file common to Dart and Flutter that combines the recommendations currently on GitHub with those generated by flutter create (which are different).
From https://github.com/github/gitignore/blob/master/Dart.gitignore:
# See https://www.dartlang.org/tools/private-files.html
# Files and directories created by pub
.packages
.pub/
build/
# If you're building an application, you may want to check-in your pubspec.lock
pubspec.lock
# Directory created by dartdoc
# If you don't generate documentation locally you can remove this line.
doc/api/
From flutter create
:
.DS_Store
.atom/
.idea
.packages
.pub/
build/
ios/.generated/
packages
pubspec.lock
.flutter-plugins
Other relevant fodder:
https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore
https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore
https://github.com/github/gitignore/blob/master/Global/Xcode.gitignore
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
matejthetree commentedon Feb 26, 2018
+1
What gitignore do you recomend to use atm with flutter projects, also with IntelliJ
natebosch commentedon Feb 26, 2018
See also dart-lang/sdk#32030 which replaces
.pub/
with.dart_tool/
in the ignore.yoryer commentedon Apr 17, 2018
You can use https://www.gitignore.io to generate dynamic gitignore files based on different editors/languages.
fmatosqg commentedon Apr 17, 2018
I'm still unsure if we should commit .iml files, specially after reading https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md
That's specifically for contributing to flutter sdk, but in my experience that's not necessary for either sdk, packages or app development.
saschpe commentedon May 5, 2018
github/gitignore#2692 for adding Flutter rules to gitignore going forward.
I suggest using https://github.com/simonwhitaker/gibo for generating .gitignore files in your projects. With the above pull-request, getting proper rules boils down to
gibo Android Dart Flutter Linux JetBrains macOS Vim Xcode > .gitignore
jeroen-meijer commentedon May 13, 2018
Maybe it's a good idea to add
GoogleService-Info.plist
to the eventual Flutter gitignore as well.zoechi commentedon May 13, 2018
.pub
is now.dart_tool
saschpe commentedon May 14, 2018
@jeroen-meijer: To keep it aligned with Android it would include
android/*/google-services.json
as well. I can adjust the patch accordinglyjeroen-meijer commentedon May 14, 2018
secondstreetmedia commentedon Sep 25, 2018
Is using https://github.com/simonwhitaker/gibo still a reasonable way to go? Using the example from @saschpe above, gibo does not currently appear to have Flutter as one of it's boilerplates.
Also, would adding any of the following be recommended: Archives, Backup, DartEditor, Java, JEnv, Kotlin, Maven, Objective-C, or any others from the list below:
timsneath commentedon Sep 25, 2018
We've updated the
.gitignore
file created byflutter create
to be much more inclusive (PR #21192). Flutter projects moving forward should get a better default, but we should integrate this back into the GitHub gitignore repo.@secondstreetmedia didn't know about this utility - cool idea. Adds to the value of fixing this issue.
37 remaining items