You can, as long as these folders are not listed in the . gitignore file and they are not empty they will be sent to the repository.
Don’t forget to add the folders before commit
$ git add pasta/
If you want to send a folder that does not have files in commit, will be necessary to use some alternative method for this. An approach that I use a lot is to create an empty file with the name .getkeep
. That way, I can know the usefulness of the file just by looking at its name.
You can create this file using the command touch
touch pasta/.gitkeep
Well remembered, Jow +1
– Jéf Bueno
I never thought of that, +1.
– Oralista de Sistemas
Cakephp uses a file
.empty
– Guilherme Lautert
And a large portion of the community uses the archive
.gitkeep
.– Woss