0

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

Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74
Yasir
  • 21
  • 2

1 Answers1

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.

Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74