Skip to main content
added 117 characters in body
Source Link
Kusalananda
  • 355.8k
  • 42
  • 735
  • 1.1k

The usual way to force adding an empty directory in systems that ignores empty directories is to add a hidden file in each such directory:

$ touch directoryname/.empty_dir
$ git add directoryname/.empty_dir
$ git push

With git, you may choose to use .gitignore in place of .empty_dir above (really, any hidden name will do, and the only reason to use a hidden filename is to avoid seeing it when you list the directory's contents with ls).

The usual way to force adding an empty directory in systems that ignores empty directories is to add a hidden file in each such directory:

$ touch directoryname/.empty_dir
$ git add directoryname/.empty_dir
$ git push

With git, you may choose to use .gitignore in place of .empty_dir above (really, any hidden name will do).

The usual way to force adding an empty directory in systems that ignores empty directories is to add a hidden file in each such directory:

$ touch directoryname/.empty_dir
$ git add directoryname/.empty_dir
$ git push

With git, you may choose to use .gitignore in place of .empty_dir above (really, any name will do, and the only reason to use a hidden filename is to avoid seeing it when you list the directory's contents with ls).

Source Link
Kusalananda
  • 355.8k
  • 42
  • 735
  • 1.1k

The usual way to force adding an empty directory in systems that ignores empty directories is to add a hidden file in each such directory:

$ touch directoryname/.empty_dir
$ git add directoryname/.empty_dir
$ git push

With git, you may choose to use .gitignore in place of .empty_dir above (really, any hidden name will do).