#should I add the contents of bin to .gitignore
3 messages · Page 1 of 1 (latest)
Hi @next edge. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Astro creates a local database at .astro/data.db when you run astro dev. This database is not persistent and is created from scratch every time you start up the dev server. Given this, it's not necessary to keep the .db, .db-shm, and .db-wal files under version control.
In addition, Astro stores important metadata for content collections in an .astro directory in your project. This directory is updated automatically anytime you run the astro dev or astro build commands. You are encouraged to ignore this directory while working in your project. If you're using Git for version control, it's recommended to ignore the .astro directory by adding .astro to your .gitignore. This tells Git to ignore this directory and any files inside of it.
Here's how you can add .astro to your .gitignore:
echo "\n.astro" >> .gitignore
You can do the same for the .db, .db-shm, and .db-wal files.
Sources:
- Astro Documentation (https://docs.astro.build/en/guides/content-collections#the-astro-directory)
- Astro Blog (https://astro.build/blog/astro-db-deep-dive#designing-a-local-database-the-astro-way)