1

Whenever I try to add folders to git hub it gives "files are empty" am i missing something? Anyone know why? It seems to me that I'm adding the folders wrong.

2 Answers2

2

Git/GitHub doesn't store empty directories.

Convention is to put empty .gitkeep file in it.


Do you need more detailed technical explanation? Check this answer

Community
  • 1
  • 1
Tomas Votruba
  • 21,278
  • 8
  • 72
  • 96
0

find . -type d -empty -not -path '*/\.*' -exec touch {}/.gitkeep \; will ignore empty directories inside the .git folder

Khairul Islam
  • 1,210
  • 1
  • 9
  • 20