Skip to content

hyrfilm/gitignore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gitignore

A simple command-line tool to manage .gitignore files from anywhere in your repo.

Install

curl -fsSL https://raw.githubusercontent.com/hyrfilm/gitignore/master/gitignore -o ~/.config/gitignore && chmod +x ~/.config/gitignore && ln -sf ~/.config/gitignore ~/.local/bin/gitignore

~/.local/bin should already be on your PATH. If not, add this to your ~/.zshrc or ~/.bashrc:

export PATH="$HOME/.local/bin:$PATH"

Usage

gitignore .env .DS_Store       # add one or more patterns
gitignore --defaults           # common patterns (.DS_Store, .env, *.log, .vscode/ ...)
gitignore --python             # Python patterns (__pycache__/, .venv/, .pytest_cache/ ...)
gitignore --js                 # JS/Node patterns (node_modules/, dist/, .next/ ...)
gitignore --list               # show current .gitignore
gitignore --undo coverage      # remove a pattern and untrack matching files

Works from any subdirectory — the tool walks up to find the repo root automatically. Already-tracked files matching a newly added pattern are untracked via git rm --cached.

Update

curl -fsSL https://raw.githubusercontent.com/hyrfilm/gitignore/master/gitignore -o ~/.config/gitignore

Uninstall

rm ~/.config/gitignore ~/.local/bin/gitignore

About

quick terminal command for .gitignore with sane defaults

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages