Skip to content

Conversation

tigran-sargsyan-w
Copy link

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.

@Copilot Copilot AI review requested due to automatic review settings September 22, 2025 15:29
@tigran-sargsyan-w tigran-sargsyan-w requested a review from a team as a code owner September 22, 2025 15:29
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a helpful header comment to the Unity.gitignore template that guides users to combine it with relevant Global/ templates for editor and OS-specific ignore rules, helping prevent IDE artifacts from cluttering Unity repositories.

  • Adds documentation to guide Unity developers toward using Global/ templates for editor/OS-specific rules
  • Maintains the existing separation between technology-specific and editor/OS ignore patterns
  • Provides a proactive solution to prevent common repository pollution issues

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant