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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM