Whenever we are creating a directory in git folder git shows us nothing to commit, it is by the design of git we can not commit empty directories. So to commit empty directory to git repository follow the steps below
- Create an empty directory
$ mkdir test
2. Then create an empty directory
$ touch test/.gitkeep
3. Add your directory with this command
$ git add test
4. Now you can commit your empty directory to git repository.
$ git commit -m "Empty directory added to git repository"