Re:Don't create .gitkeep files, use .gitignore instead
by zahlman on Saturday February 21, 2026 @03:13PM
(#47104217)
I like to make a .local folder at the top of the project, which contains a .gitignore that ignores everything. Then I can effortlessly stash my development notes there without affecting the project .gitignore or messing around within the .git directory.
[ Parent
| on HN ]
Re:Don't create .gitkeep files, use .gitignore instead
by beAbU on Sunday February 22, 2026 @05:50AM
(#47110000)
Why not put '.local' in your toplevel gitignore, and not commit an empty .local folder up to the forge?
Re:Don't create .gitkeep files, use .gitignore instead
by zahlman on Sunday February 22, 2026 @01:35PM
(#47113445)
Upstream never sees an empty .local folder because, as established, Git doesn't keep empty folders. This way, .local isn't mentioned in the top-level .gitignore. It's just that tiny bit cleaner.
Re:Don't create .gitkeep files, use .gitignore instead
by ddek on Sunday February 22, 2026 @01:50PM
(#47113566)
You can create a global gitignore in your home directory. I have ‘.<myname>’ ignored there, so if I ever create a directory with that name I know it’s contents won’t go into source control. That way I don’t have to edit the repositories gitignore with me-specific stuff.