The archive .gitkeep
, which can be used in your project when, for several different reasons you want to create an empty directory and commit it at a certain point of development. Ex: When you create a directory to save files like photos, Pdfs and so on...
The archive .gitkeep
is only a convention between developers, there being no mention of this (to date) on the site git officer, but as it is a standard among developers, it serves for you to "pass a message" to others who will see your project in the future.
Create within your project the directory you want to commit and within this directory create a file called . gitkeep, leaving something like this...
project-dir/
├── .git
├── other-dir
└── untracked-dir
└── .gitkeep
Okay, now you can run the commands git add [seus arquivos]
and git commit -m [mensagem de commit]
. Now when another developer comes across this file he will know what it is about!
Maybe it’s important, but just out of curiosity, why would you want to browse an empty directory?
– Felipe Avelar
Very right. I added an example to help you understand. Thank you!
– Lucio
Related: https://answall.com/q/256998/64969
– Jefferson Quesado