Ancestors

Written by Curtis "Ovid" Poe (he/him) on 2024-12-28 at 09:07

Sometimes you want to just have an empty directory in git, but not commit any files in it.

touch data/.gitkeep

And add this to your .gitignore:

data/*

!data/.gitkeep

Then commit. Now you have an "empty" directory.

[#]git #programming

=> More informations about this toot | More toots from ovid@fosstodon.org

Toot

Written by Mohit Sindhwani on 2024-12-28 at 09:11

@ovid

Ya, I think Rails creates directories with a .keep in them for exactly this reason

=> More informations about this toot | More toots from onghu@ruby.social

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113729674231088444
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
285.792093 milliseconds
Gemini-to-HTML Time
0.441955 milliseconds

This content has been proxied by September (3851b).