.gitignore和之间有什么区别.gitkeep?它们是不同名称的同一个东西,还是它们都起着不同的作用?我似乎无法找到很多文档.gitkeep.
我从这篇文章中读到了解释为了使git跟踪文件夹,必须至少有一个空文件:
Currently the design of the Git index (staging area) only permits files
to be listed and nobody competent enough to make the change to allow
empty directories has cared enough about this situation to remedy it.
Directories are added automatically when adding files inside them.
That is, directories never have to be added to the repository,
and are not tracked on their own. You can say "git add <dir>" and it
will add the files in there. …Run Code Online (Sandbox Code Playgroud)