About This Tool
Generate .gitignore files for your project by selecting your programming languages, frameworks, IDEs, and operating systems. The tool combines curated ignore patterns from GitHub's official gitignore templates to create a comprehensive .gitignore that keeps your repository clean from build artifacts, dependencies, and system files.
Frequently Asked Questions
- Where should I put the .gitignore file?
- Place .gitignore in your repository root directory. You can also have .gitignore files in subdirectories for directory-specific rules. Git processes them hierarchically from root to leaf.
- Does .gitignore remove already-tracked files?
- No. .gitignore only prevents untracked files from being added. If a file is already tracked, adding it to .gitignore won't remove it. Run 'git rm --cached <file>' first to stop tracking it.
- What patterns are most commonly needed?
- node_modules/ for JavaScript, __pycache__/ for Python, .env for secrets, .DS_Store for macOS, and IDE directories (.idea/, .vscode/). These cover the most common accidental commits.
- Can I have a global .gitignore?
- Yes. Create a global .gitignore with 'git config --global core.excludesfile ~/.gitignore_global'. This applies to all your repositories — perfect for OS and IDE files (.DS_Store, Thumbs.db, .idea/).