在文件夹中创建 .gitkeep 文件,文件内容如下
# Ignore everything in this directory * # Except this file !.gitkeep
保存即可
git rm filename(同时在缓存和物理存储中删除文件,慎用)
git rm --cache filename(只在缓存中删除对应的文件)