这是我的.gitignore:
#ignore all kind of files
*
#except php files
!*.php
Run Code Online (Sandbox Code Playgroud)
我想要的只是忽略除了.php之外的所有文件,但是这个.gitignore我也忽略了文件夹...
有没有办法告诉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
Run Code Online (Sandbox Code Playgroud) 我见过的人加入.gitkeep,.keep在一个Git回购在空目录中的文件,我只是不明白为什么我会永远需要跟踪EN空目录.
你能举一些必要的例子吗?
有关