Where to keep project files that should not go to Git

Posted . Visible to the public.

Sometimes you have a file that is related to a project, while not actually being part of it. You'd like to keep them around, but others won't need them – e.g. some notes, a log, or a database dump.

Sure, you have a project directory – but all of it is tracked by Git. A project's tmp/ directory is usually not tracked, but by definition it is not a good place to keep things.

I suggest you keep your related files in a related-files/ directory within your project(s).

To keep this directory untracked by Git in all your projects, add it to your global .gitignore file with echo related-files >> ~/.gitignore.

Further reading

Profile picture of Dominik Schöler
Dominik Schöler
Last edit
Daniel Straßner
License
Source code in this card is licensed under the MIT License.
Posted by Dominik Schöler to makandra dev (2024-02-02 07:56)