Add empty folder/directory to a git repository
Create a .gitignore file with the following
*
!.gitignore
if you want sub directories you will need to include them in the exclude part which is prefixed with an exclamation mark.
ie.
*
!.gitignore
!/mysubdirectory