[Django]-Should I add Django admin static files to my git repo?

36👍

While you can absolutely check these files in, I typically recommend not checking in the collected static files into git (we use .gitignore to ignore them). Instead, we call collectstatic during our build/deploy steps so that if anyone ever adds new static files, they are collected and copied to the proper output directory for serving by nginx or sent up to s3. If you want to check them into git, I would recommend having collectstatic as a precommit hook so that no one accidentally forgets to run it when adding a new static file.

👤2ps

Leave a comment