git add --all 为啥不能添加空文件夹,这样设计的初衷是

 

git add --all 为啥不能添加空文件夹,这样设计的初衷是?

好多项目还得弄个假文件在空文件夹里面占位
这个算设计失误吧,见

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.

大概就是,有能力搞的人不关心,没能力搞的人搞不动……



作者:Leedy
链接:http://www.zhihu.com/question/29811994/answer/45721540
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

 

大概是linus一开始就把快照设计成只有文件组成,后来想想要改太难,就算了吧。反正你们可以用假文件来占位(oh,so linux!),为什么要linus亲自实现它。

 

现在的主流做法是在空文件夹里放置一个.gitkeep文件

 

posted @ 2016-06-13 10:08  沧海一滴  阅读(6651)  评论(0编辑  收藏  举报