Some people have told me that the correct thing is to create an empty file and put it inside each folder and set a .gitignore
like this:
/pasta/subpasta/*
!/pasta/subpasta/.arquivovazio
And other people told me to create a .gitignore file inside each folder with the following content:
# ignorar todos
*
# exceto o .gitignore
!.gitignore
Create a single file .gitignore
or one in each folder? What is the best alternative?
Remembering that both forms have been tested and worked.