Hacker News new | ask | show | jobs
by der_gopher 90 days ago
yes, but user level is not a repo level
1 comments

Yes, but this is exactly the sort of thing that should be a user-level configuration. A personal scratch directory has nothing to do with the repository itself and doesn’t belong in a repo’s .gitignore.

If it's only needed for one particular checkout, .git/info/exclude is the other obvious option.

You don't need to put the scratch directory in the committed gitignore file. gitignore files are recursive. So a common approach is to use a gitignore with * in the scratch directory.