By:Kirito

Git 添加空文件夹的方法

转自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:

在空目录下创建.gitignore文件。

文件内写入如下代码,可以排除空目录下所有文件被跟踪: 

# Ignore everything in this directory 
*
# Except this file !.gitignore
作者:KKcat
    
个人博客:http://jinzhao.me/
posted @ 2015-12-11 16:36  丶Kirito  阅读(1528)  评论(0编辑  收藏  举报