我希望的是忽略除 .php 文件以外的所有文件,但使用这个 .gitignore 文件我也在忽略文件夹...
#ignore all kind of files
*
#except php files
!*.php
有没有一种方法可以让Git接受我的项目文件夹结构,同时只跟踪.php文件?
现在似乎我无法将文件夹添加到我的仓库中:
vivo@vivoPC:~/workspace/motor$ git add my_folder/
The following paths are ignored by one of your .gitignore files:
my_folder
Use -f if you really want to add them.
fatal: no files added