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