- What is a .gitignore file and why do I need it?
- A .gitignore file tells Git which files and directories to ignore when tracking changes in your repository. It prevents accidentally committing build artifacts, dependencies, temporary files, sensitive data, IDE configurations, and OS-specific files. This keeps your repository clean, reduces repository size, improves Git performance, and protects sensitive information from being versioned.
- How do I use multiple templates together?
- You can select multiple templates (e.g., Node.js + React + VS Code) and the generator will automatically merge them, removing duplicate patterns. Templates are intelligently combined: language templates provide base rules, framework templates add framework-specific ignores, and editor templates add IDE-specific files. The final .gitignore contains all unique patterns from your selected templates.
- Can I add custom ignore patterns?
- Yes, you can add custom ignore patterns in the Custom Rules section. Enter one pattern per line, using the same glob pattern syntax as .gitignore files. Examples include: *.log (ignore all log files), node_modules/ (ignore node_modules directory), .env (ignore environment files), or dist/ (ignore build output). Custom patterns are appended to the generated template content.
- What patterns should I include in my .gitignore?
- Common patterns to include: build outputs (dist/, build/, target/), dependencies (node_modules/, vendor/, .venv/), IDE files (.vscode/, .idea/, *.swp), OS files (.DS_Store, Thumbs.db), environment files (.env, .env.local), logs (*.log, logs/), and temporary files (*.tmp, *.cache). The generator's templates include these common patterns for your selected tech stack.
- How do I apply the generated .gitignore to my project?
- After generating your .gitignore, you can copy the content to clipboard and paste it into a new .gitignore file in your project root, or download it directly. If you already have a .gitignore file, you can merge the patterns manually. After adding the file, Git will automatically ignore the specified files. Note: .gitignore only affects untracked files; to ignore already tracked files, you need to remove them from Git's index first.