4 ms·
For many years I've have a git-ignored ".not-committed" folder in all of my repos for throwing extra anything into. It's been a huge life saver!
by electrovir 27d ago
For many years I've have a git-ignored ".not-committed" folder in all of my repos for throwing extra anything into. It's been a huge life saver!
- Zambyte 27d agoYou can just add it in a user-level gitignore instead of ignoring it in every repo. See: ~/.config/git/ignore
- saghm 27d agoI only realized very recently that being able to specify .gitignore files in any part of a repo can be combined with wildcards to just put `.gitignore` with `*` in a arbitrary directories to make them get ignored without needing to modify any wider configuration.
- zzril 27d agoI'm doing that all the time. Starting with a .vim directory that contains vim-specific files, such as scripts / build commands to be run on certain key combinations, to ".misc" / ".scratch" / ".notes" / ".api-keys" directories... I wouldn't want to list them all in my global .gitignore because I'd certainly forget half of the names I tend to give to these...
- der_gopher 27d agoyes, but user level is not a repo level
- sReinwald 27d agoYes, 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.
- leleat 27d agoYou 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.
- zelphirkalt 27d agoThis has the disadvantage though, that this user level gitignore file will not be in the repo, which means that other less careful contributors have to fix ignoribg for themselves.
- mckee_plus_plus 27d agoAnd then you have a known path to script up all your repos' stuff for backup
- deleted 27d ago[deleted]
- d3fd44 27d agoi usually do "*ignorethis*", so a file with .ignorethis extension does not strictly have to be under a specific directory, this might save context somewhere. similar approach but yeah, a huge life saver!