'How do I add a new blank directory to a Git repository [duplicate]

How can I add a blank directory (that contains no files) to a Git repository?

git


Solution 1:[1]

Git does not allow adding/tracking empty directories (as for, for example, CVS).

There is a common convention to add an empty file to the directory you need to track named .gitkeep.

You will remove this file if a meaningful file will be added to it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Antonio Petricca