Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on What is a .gitkeep file?
Parent
What is a .gitkeep file?
Sometimes there are empty files named .gitkeep
sprinkled around a repository. What are these files?
Post
They are not a part of git the way .gitignore
files are. It's just a convention to add empty directories to git repositories.
Normally git ignores empty directories altogether. Adding an empty file — conventionally named .gitkeep
— will make git recognize the directory.
Oftentimes people don't bother removing these files after real files are added, so they are just left haunting there. It is perfectly safe to remove them if there are other files in the directory.
0 comment threads