我使用的作曲家,發展我想保持git的文件夾中的供應商目錄中,所以我可以跟蹤diff文件等,所以我的項目結構是:如何讓git忽略vendor /下的.git文件夾?
projectroot/
.gitignore
file1
file2
vendor/
dir1/
module1/
.git/
module1file1
module1file2
...
dir2/
module2/
.git/
module2file1
...
我想承諾git,這些文件:
file1
file2
vendor/dir1/module1/module1file1
vendor/dir1/module1/module1file2
vendor/dir2/module2/module2file1
...
我的projectroot/.gitignore文件應該是什麼?從the composer docs我試圖
vendor/*.git
和
vendor/*/.git
但在這兩種情況下,git的1.8.3仍然希望提交vendor/dir1/module1
和vendor/dir2/module2
爲子模塊,在這裏我要提交的文件,而不是下面。
在這種情況下應該使用.gitignore語法?
嘗試'vendor/** /。git'? – Sisir 2015-08-19 07:15:33