合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
[参考](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: 在空目录下创建.gitignore文件。 创建好文件后先不急着写下面两句,先将.gitignore添加至git库托管(重要) 文件内写入如下代码,可以排除空目录下所有文件被跟踪: ~~~ # Ignore everything in this directory * # Except this file !.gitignore ~~~ -------------------------------------------------------------------------- >[info] 对于上面的方法,我更喜欢在文件夹下创建一个README.MD的文件,然后在.gitignore中忽略规则:此文件下,除了README.MD全部忽略