Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 git,我想知道是否可以签入空文件夹?
不,你不能。您不能在 Git 中提交空文件夹。
一种常见的解决方法是在.gitkeep文件夹中添加一个空文件,然后将其签入,或者简单地放置一个.gitignore,忽略将在该文件夹中结束的文件类型。大概,你想忽略它们,或者你有一些事情要提交。
.gitkeep
.gitignore