转自stackoverflow: http://stackoverflow.com/questions/115983/how-do-i-add-an-empty-directory-to-a-git-repository Another way to make a directory stay empty (in the repo) is to create a .gitignore inside that directory that contains two lines: 在空目录下创建.g
Git:.gitignore和.gitkeep文件的使用 Git:.gitignore和.gitkeep文件的使用 https://majing.io/posts/10000001781172 .gitkeep .gitkeep是一个占位文件. Git是不会把一个完全空的文件夹添加到版本控制里,为了让空文件夹被跟踪,常规做法是在空文件夹里添加.gitkeep. 注意:.gitkeep并不是Git的特性.Git没有对占位文件名有要求,你可以放一个README也行. git - What are t