.gitignore shell function
git
Extended Usage
Add this function to your ~/.zshrc
or ~/.bashrc
for quick .gitignore updates.
Examples
# Single entry
gi node_modules/
# Multiple entries
gi dist/ .env *.log
# Common patterns
gi build/ dist/ out/
gi .env .env.local .env.*.local
gi *.log tmp/ temp/ .DS_Store
Pro Tips
- Use quotes for special characters:
gi "*.tmp"
- Check additions:
tail .gitignore
- Remove duplicates:
sort -u .gitignore -o .gitignore
Share: