Report this

What is the reason for this report?

How to add and commit an empty directory in my Git repository?

Posted on November 16, 2020

Hi all,

I need to commit an empty directory to my Git project, but when I create a new directory with:

  1. mkdir my_dir

And then check the status with:

  1. git status

Git says that there is nothing to commit, so running git add . does not do anything.

How can I add an empty directory/folder to my Git repository?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.