linux git 推送空文件夹

/*********************************************************************************
 *                            linux git 推送空文件夹
 * 说明:
 *     绝大多数时候是不需要推送空文件夹的,但是做文件系统的时候是需要,有些文件夹
 * 是需要等系统跑起来才行。
 *
 *                                       2017-1-3 深圳 南山平山村 曾剑锋
 ********************************************************************************/

一、参考文档:
    1. How can I add an empty directory to a Git repository?
        http://stackoverflow.com/questions/115983/how-can-i-add-an-empty-directory-to-a-git-repository

二、操作实例:
    find . -name .git -prune -o -type d -empty -exec touch {}/.gitignore \;
   find . -name .git -prune -o -type d -empty -exec touch {}/.emptyFolders \;

 

posted on 2017-01-03 09:40  zengjf  阅读(698)  评论(0编辑  收藏  举报

导航