我使用的作曲家,发展我想保持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