The .gitkeep
file, 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 in development. Ex: When you create a directory to save files like photos, PDFs and so on ...
The .gitkeep
file is just a convention between developers, and there is no mention of it (so far) on official Git , but as it is a standard among developers, it is for you to "pass on 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
Done, you can now run the commands git add [seus arquivos]
and git commit -m [mensagem de commit]
. Now when another developer comes across this file you will know what it's all about!