Flutter: gitignore is... ignored
As mentioned in the comment,
- Remove the
build
directory entirely - Add
build
to.gitignore
- Commit
- Build flutter again
They should no longer appear.
This likely happen because there's some part of build
directory already committed before build
was added to the .gitignore
file.
Dani
for (1 < 2) { eat(); code(); for (true === true) { beer(); } sleep(); }
Updated on December 30, 2022Comments
-
Dani over 1 year
I have a
gitignore
in my root folder, next to lib, ios, android, build... folders.Inside it I have a bunch of ignored folders, one is
build/
but every time I do some changes this folder appears again:modified: build/ios/iphonesimulator/Runner.app/Frameworks/GTMAppAuth.framework/GTMAppAuth modified:build/ios/iphonesimulator/Runner.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher
I guess this has nothing to do with Flutter, that it's only Git, but this only happens with my Flutter projects, not with the rest
-
BinHong almost 3 yearsIs gitignore already committed with the build directory in it? If not, try removing the build directory entirely, add build to gitignore, commit, then trying building flutter again. They should no longer appear.
-
Dani almost 3 yearsyeah, it was that. Removing again the build folder did the trick. It doesn't ignore it by default. Feel free to move that to an answer
-