All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- 17+ Built-in Templates - Python, Node.js, Rust, C, C++, Java, Go, Swift, Ruby, PHP, TypeScript, VS Code, Vim, IntelliJ, macOS, Linux, Windows all compiled into binary
- Smart Append Mode - Automatically appends to existing
.gitignorefiles instead of overwriting - Automatic Duplicate Removal - Intelligently removes duplicate patterns across all operations (init, sync, add)
- Multiple Pattern Support - Add multiple file/path patterns at once:
gitignore node_modules/ *.log .env - Swift Template - Added built-in Swift/iOS template
- Windows Template - Added built-in Windows-specific patterns template
- Auto Template Generator -
scripts/generate_templates.shautomatically generatessrc/templates.cfromtemplates/directory - Easy Template Addition - Simply drop
.gitignorefiles intotemplates/directory and runmake regen-templates - Template Source Files - All templates now maintained as separate
.gitignorefiles intemplates/directory - No Manual C Editing - Template generator handles all C code generation and escaping automatically
- Smart PREFIX Detection - Install to custom locations easily with
PREFIX=/path make install - Environment Variable Support - Use
export PREFIX=~/.localfor user-local installations - Install Script PREFIX - Installation script accepts custom prefix:
./install.sh ~/.local - Show PREFIX Target - New
make show-prefixto display installation configuration - Setup Templates Target - New
make setup-templatesto initialize template directory - Regenerate Templates Target - New
make regen-templatesto force template regeneration - Distribution Clean - New
make distcleanto remove all generated files includingtemplates.c
- Better Conflict Detection - Clear error messages when pattern names conflict with command names
- Helpful Error Messages - Suggests correct usage when ambiguous arguments are detected
- Interactive Mode Shortcuts - Added
-tflag as quick alternative to-Ifor interactive mode - Colored Progress Output - Visual feedback during template generation and builds
- Comprehensive Help - Enhanced
make helpwith detailed target descriptions
- Templates Now Embedded - All built-in templates compiled directly into binary (no external files needed at runtime)
- Template Priority System - Custom templates (
~/.config/gitignore/templates/) override built-in templates - Removed External Template Files - No longer need
templates/directory after build (templates embedded in binary)
- Makefile Improvements - Smart PREFIX detection, better output formatting, comprehensive targets
- Template Generation Process - Automated via
make templatesbefore compilation - Source Structure - Added
templates.cto source files (auto-generated, not manually edited)
- Flexible Installation Paths - No longer hardcoded to
/usr/local - No-Sudo Installation - Can install to user directories like
~/.localwithout root privileges - PATH Helper - Installation script offers to add custom install paths to shell configuration
- Init Behavior - Now appends to existing
.gitignoreinstead of replacing - Sync Behavior - Downloads from GitHub and merges with existing patterns, removing duplicates
- Pattern Addition - Checks for duplicates before adding, skips existing patterns
- All Operations Non-Destructive - Preserves existing
.gitignorecontent across all operations
- Built-in Templates Not Working - Fixed issue where built-in templates weren't accessible (now properly embedded)
- Init Overwriting Files - Fixed
initcommand overwriting existing.gitignorefiles - Sync Overwriting Files - Fixed
synccommand overwriting existing.gitignorefiles - Duplicate Patterns - Fixed issue where duplicate patterns could be added
- Template Not Found - Fixed Swift and other built-in templates not being found
- Windows Support - Added Windows-specific template (was missing)
- Manual Template Editing - Removed need to manually edit C code for new templates
- README.md - Complete rewrite with badges, better examples, comprehensive feature documentation
- ADDING_TEMPLATES.md - New comprehensive guide for adding custom templates
- Makefile Help - Enhanced with detailed descriptions of all targets
- Install Script Help - Added
--helpflag with usage examples - Man Page - Updated with all new features and examples
- CHANGELOG.md - Added this changelog following Keep a Changelog format
- Template Addition Workflow - Simplified from manual C editing to drop-in
.gitignorefiles - Auto-generated Code - No more manual escaping or C string formatting
- Clear Build Process - Templates auto-generated before compilation
- Better Makefile Targets - Intuitive targets for common development tasks
- Comprehensive Documentation - Added
docs/directory with guides
- Faster Template Access - Templates compiled into binary (no file I/O)
- Efficient Deduplication - Optimized duplicate detection algorithm
- Template Caching - GitHub-synced templates cached for 24 hours
- Reduced Dependencies - No external template files needed after build
- No External File Access - Built-in templates don't require file system access
- Validation - Better input validation for pattern names
- Safe Escaping - Auto-generator handles special character escaping correctly
- Initial release
- Basic init and sync functionality
- Custom template support from
~/.config/gitignore/templates/ - GitHub template synchronization
- Cache system for downloaded templates
- Backup and restore functionality
- Auto-detection of project types
- Interactive mode
- Global gitignore support
- Colored terminal output
- Man page documentation
None - v2.0.0 is fully backward compatible with v1.0.0
-
Install to Custom Location:
# Old way: hardcoded /usr/local sudo make install # New way: flexible make PREFIX=~/.local install # No sudo needed!
-
Add Custom Built-in Templates:
# Old way: edit templates.c manually (error-prone) vim src/templates.c # New way: drop in a file echo "*.ext" > templates/mytemplate.gitignore make regen-templates make
-
Multiple Patterns:
# Old way: one at a time gitignore node_modules/ gitignore .env gitignore *.log # New way: all at once gitignore node_modules/ .env *.log
-
Non-Destructive Operations:
# v1.0: Would overwrite gitignore init python # Lost existing patterns! # v2.0: Preserves and merges gitignore init python # Keeps existing + adds Python
-
Check Installation Path:
make show-prefix
-
Regenerate Templates (if you had custom modifications):
make distclean make
-
Test Append Behavior:
# Create test .gitignore echo "test" > .gitignore # Add template gitignore init python # Verify "test" is still there grep "test" .gitignore
We use SemVer for versioning. For the versions available, see the tags on this repository.