6 ms·
The idea is that you don't want to check-in any builds.
by williadc 7mo ago
The idea is that you don't want to check-in any builds.
- yjftsjthsd-h 7mo agoSure, so gitignore build/ or whatever. But you don't need to unignore .gitkeep
- akerl_ 7mo agoThe idea is that instead of adding a nonsense file, you use the native .gitignore functionality. ".gitkeep" is just a human thing; it would work the same if you called it ".blahblah". So their pitch is that if you want to explicitly keep the existence of the directory as a committed part of the repo, you're better off using the actual .gitignore functionality to check in the .gitignore file but ignore anything else in the directory. I don't find it amazingly compelling; .gitkeep isn't breaking anything.
- dwattttt 7mo agoThis still confuses me. Do you mean to say "use the .gitignore functionality, and check in the .gitkeep file"?
- deleted 7mo ago[deleted]
- akerl_ 7mo agoNo. Use a .gitignore instead of .gitkeep. Instead of checking in build/.gitkeep, check in build/.gitignore.
- dwattttt 7mo agoI don't know that I like this approach. It certainly works, but it's not specifically what (people expect) a .gitignore file to be used for. That confusion isn't good: https://thecodelesscode.com/case/222 https://thecodelesscode.com/case/222 and https://thecodelesscode.com/case/223 https://thecodelesscode.com/case/223
- akerl_ 7mo ago.gitignore is the officially recommended way to do this: https://archive.kernel.org/oldwiki/git.wiki.kernel.org/index.php/GitFaq.html#Can_I_add_empty_directories.3F https://archive.kernel.org/oldwiki/git.wiki.kernel.org/index...
- Supermancho 7mo agoGranted, naming is hard. Routinely using a file named .deleteme or .rememberwalkthedog because it's recommended instead of a more readable solution, is not a compelling reason to switch.