Answer the question
In order to leave comments, you need to log in
How to properly add migration files to gitignore?
Tell me how to make gitignore in such a way that it would not upload migration files?
At the moment I have this:
*kapvenv
*.idea
*my_settings.py
*__pycache__
*media
*/migrations/*
pycache/
*/pycache/
*.py[cod]
But with this arrangement, my migrations folder disappears, I need to hide only the migration files themselves by type 0001_initial.py
Answer the question
In order to leave comments, you need to log in
That's right - no way. Migrations are an integral part of the project and should not be excluded.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question