git 上传空的文件夹

2017-06-19  本文已影响433人  Michael1

有时候我们为了保证项目结构,所以要上传空的文件夹到git , 这时候只需要在git 根目录下执行
find . -type d -empty -exec touch {}/.gitignore \; 就可以上传空的文件夹 (其实原本是空的文件夹里建立的一个.gitignore)。

How can I add an empty directory to a Git repository?

上一篇 下一篇

猜你喜欢

热点阅读