|
|
|
|
|
by KPGv2
123 days ago
|
|
That's a hack. What you should do is a .gitignore with * and then a whitelist of paths like src/**/*. If you rely on `add -f` you will forget to commit something important. For example, for a tree sitter grammar I developed a couple years ago, here is my .gitignore: ``` # Ignore everything * # Top-level whitelist CHANGELOG.md # Allow git to see inside subdirectories !*/ # Whitelist the grammar and tests !/grammar/*.js !/test/corpus/*.txt # Whitelist any grammar and tests in subdirectories !/grammar/**/*.js !/test/corpus/**/*.txt ```* |
|
But isn't the idea in TFA to blacklist the entire `build/` tree? We don't want to add anything there.