gitignore icon indicating copy to clipboard operation
gitignore copied to clipboard

Add header note in Unity.gitignore about using Global editor/OS templates

Open tigran-sargsyan-w opened this issue 3 months ago • 0 comments

Summary

Add a short header comment to Unity.gitignore that points users to the Global/ templates (JetBrains/Rider, Visual Studio, etc.). This helps prevent editor/OS noise from being committed into Unity repositories.

Problem / Context

Many Unity projects accidentally commit IDE-specific and user-local files (e.g., .idea/, .vs/, editor caches). This clutters diffs, inflates repos, and leaks local settings. The repository already separates technology templates from editor/OS rules (kept under Global/), but Unity users often miss this and try to add those rules into the Unity template itself.

Real-world evidence (screenshots)

  • Screenshots — repo polluted with IDE configs (.idea/, .vs/, Rider/VS artifacts) , noisy diffs from user-local files, accidental commits of machine-specific artifacts after onboarding a new teammate Screenshot 2025-09-22 171023 Screenshot 2025-09-22 171204 Screenshot 2025-09-22 171246 Screenshot 2025-09-22 171910 Screenshot 2025-09-22 172610

Proposed change (documentation-only) Add a non-intrusive header note to Unity.gitignore:

#
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
#
+ # Recommended: add any editor/OS/tool-specific ignore rules from the Global/ templates as needed.
+ # See: https://github.com/github/gitignore/tree/main/Global
+ #
.utmp/
/[Ll]ibrary/
/[Tt]emp/

Why this approach

  • Respects repository policy: technology-specific rules live in the tech template, editor/OS rules in Global/.
  • Zero behavior change for existing users; it’s guidance only.
  • Prevents common mistakes without duplicating editor rules into every technology template.

Before / After

  • Before: Users often overlook Global/ templates; Unity repos end up with .idea/, .vs/, and other local artifacts.
  • After: Clear nudge at the top of the Unity template to combine it with relevant Global/ templates, reducing noise and repo size.

Scope & Impact

  • Files changed: Unity.gitignore (comment-only).
  • No ignore-rule changes; no breaking behavior.
  • Benefits all Unity users, regardless of IDE.

Alternatives considered

  • Adding .idea/ / .vs/ directly into Unity.gitignore: rejected to keep editor/OS rules centralized in Global/.
  • Editing only the repo README: helpful, but developers usually copy Unity.gitignore straight from the file, so an inline hint is more effective.

tigran-sargsyan-w avatar Sep 22 '25 15:09 tigran-sargsyan-w