1. 程式人生 > >Git 新增空資料夾的方法

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.cnblogs.com/
個人部落格:http://jinzhao.me/
    
本文版權歸作者和部落格園共有,歡迎轉載,但未經作者同意必須保留此段宣告,且在文章頁面明顯位置給出原文連線,否則保留追究法律責任的權利。