I've been thinking about this.
See here: Should I be adding the Django migration files in the .gitignore file?
I agree with Robert L, it says that we shouldn't commit our migrations.
My questions are:
1) How to ignore all migrations except for the init.py file that is inside the migrations folder?
2) How to remove migrations that were already committed?
I'm looking to avoid any conflicts between developers.
app structure example:
|_roles
|__pycache__
|___init__.cpython-37.pyc
|_admin.cpython-37.pyc
|_forms.cpython-37.pyc
|_models.cpython-37.pyc
|_urls.cpython-37.pyc
|_views.cpython-37.pyc
|_migrations
|__pycache__
|___init__.cypthon-37.pyc
|___0001_initial.cpython-37.pyc
|___0002_auto_20200111_1307.cpython-37.pyc
|___0003_auto_20200111_1418.cpython-37.pyc
|__init_.py
|_0001_initial.py
|_0002_auto_20200111_1307.py
|_0003_auto_20200111_1418.py
|__init_.py
|_admin.py
|_apps.py
etc..
.gitignore: I'm thinking about:
*./migrations/
But this would exclude the whole folder.