I have a folder called migrations
and inside that folder it has few python files which looks like this:
migrations/
__init__.py
0001_auto_20210203_1910.py
0002_auto_20210203_1910.py
0003_auto_20210203_1910.py
What I want to is to push migrations
folder with __init__.py
to my github and ignore other python files.
This is what i'm doing by following this question Make .gitignore ignore everything except a few files:
migrations/*
!migrations/__init__.py
But it doesn't work as expected. What should I write in my .gitignore?
Thanks