Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

IDE Doesn't Belong in my .gitignore File

The author argues that IDE-specific files should not be added to .gitignore, as it pollutes the file with non-project settings. Instead, developers should configure a global .gitignore on their local machine to exclude editor-specific files, keeping the project's .gitignore focused on actual build artifacts and dependencies.

Background

- Your `.gitignore` file tells Git which files (like build artifacts or secrets) to intentionally *exclude* from version control. This post pushes back on the common practice of adding IDE/editor-specific files (e.g., `.vscode/`, `.idea/`) to a project's shared `.gitignore`. - The author argues that `.gitignore` should only cover files that are *unambiguously* project-level (compiled binaries, dependencies, environment variables), whereas IDE settings reflect personal preference and should be ignored locally via a separate `~/.config/git/ignore` (a "global gitignore"). - The post also warns that checking IDE configs into the repo can introduce editor-specific lock-in, break workflows for contributors using different editors, and cause friction when those files change for non-code reasons. - This sits within a long-running debate in software culture about how much of a developer's personal tooling setup should be shared with the team versus kept private.

Related stories