In my Django project, I have many migrations directory, I want to add to my .gitignore file:
Because they are under each app directory, I do not want to add every one.
How can I add all the migrations
directories in it?
Now in it only like this:
.idea/
This is a correct:
**/migrations/**
!**/migrations
!**/migrations/__init__.py
You can add "**/migrations/*" to your .gitignore file, this will add all folders and it's contents called migrations to git ignore. More informations here
You can add a new line in .gitignore file like so -
**/migrations/
if the migrations
folder is multiple level deep add the same in the .gitignore like the following
**/**/migrations
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With