very_good_cli icon indicating copy to clipboard operation
very_good_cli copied to clipboard

chore: Explicit .gitignore rules for macOS and Windows generated files

Open frantovar opened this issue 6 months ago • 1 comments

Description:

When creating a new Flutter project with the cli the default .gitignore includes explicit rules for ios/ and android/ generated files. However, it seems to lack equally explicit rules for common generated files within the macos/ and windows/ directories.

I've noticed that when I added a package with native dependencies to my project (e.g., package_info_plus).

I think the next files should not be tracked in Git for macOS and Windows:

macOS:

  • macos/Flutter/*.xcconfig (e.g., Flutter-Debug.xcconfig, Flutter-Release.xcconfig)
  • macos/Flutter/GeneratedPluginRegistrant.swift
  • macos/Runner.xcworkspace/contents.xcworkspacedata (and potentially other generated files within .xcworkspace/ that are not xcshareddata).

Windows:

  • windows/flutter/generated_plugin_registrant.cc
  • windows/flutter/generated_plugin_registrant.h
  • windows/flutter/generated_plugins.cmake

Thank you @marcossevilla for considering this improvement!

Requirements

  • [ ] No functional changes to the code.
  • [ ] All CI/CD checks are passing.
  • [ ] There is no drop in the test coverage percentage.

Additional Context

No response

frantovar avatar Jun 17 '25 10:06 frantovar

hey @frantovar, thanks for submitting this issue!

I was checking what is the .gitignore from a flutter create project and I have this from 3.32.0:

# linux/.gitignore
flutter/ephemeral
# macos/.gitignore
# Flutter-related
**/Flutter/ephemeral/
**/Pods/

# Xcode-related
**/dgph
**/xcuserdata/
# windows/.gitignore
flutter/ephemeral/

# Visual Studio user-specific files.
*.suo
*.user
*.userosscache
*.sln.docstates

# Visual Studio build-related files.
x64/
x86/

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/

Which seems to be pretty aligned with what we already have on very_good_core. So I'm curious of what are the reasons to ignore the files you're mentioning, particularly the generated plugin registrant files since they can have custom platform logic.

marcossevilla avatar Jun 17 '25 11:06 marcossevilla

Hi @frantovar,

Were you able to take a look to the comment of @marcossevilla above? Thanks!

omartinma avatar Oct 27 '25 10:10 omartinma

Hi @omartinma! Sorry, I totally forget about the issue.

As @marcossevilla said it seems Very Good CLI is indeed totally aligned with the Flutter's official templates.

frantovar avatar Oct 27 '25 18:10 frantovar

@frantovar thanks for checking! I'll close this issue since everything is aligned :)

marcossevilla avatar Oct 28 '25 15:10 marcossevilla