Add empty folder/directory to a git repository

By Tech Writer git
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.   * !.

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