git-ignore

git-ignore is a small Rust CLI that fetches, lists, and patches .gitignore templates — the usual "make me a .gitignore for Node, Rust, …" tool, plus managed blocks inside your existing file. It is also a personal technical study of what a CLI looks like when you build it around gix (gitoxide) and redb instead of shelling out to git or walking thousands of files on disk.

Warning

This is a pet project used to learn and experiment with optimizations. It is not meant for production use or anything mission critical, use it at your own risk.

How it works

What I measured

Syscall counts via strace -c on a static x86_64-unknown-linux-musl profiling build, against the default upstream (github/gitignore):

Task Command Syscalls Notes
List everything git-ignore list 39 zero-copy rkyv memory map (down from 96)
Patch a file git-ignore patch Node 173 parses and merges managed template blocks
System & DB info git-ignore info 304 sources, git HEAD, table counts, SHA256 checks
Fresh upstream sync git-ignore update -f 3,663 full git fetch, tree diffing, paged redb storage
Note

A simple "hello world" in some languages can burn over 300 syscalls just to run

Try it

Requires Rust (nightly recommended for fully static builds) and just for the build recipes:

cargo build --release