子模块 submodule
git submodule add git@github.com:sleepyddl/hexo-theme-yilia.git themes/yilia //添加子模块
git submodule init //添加后不会立刻同步 执行init建立关联 Submodule 'themes/yilia' (git@github.com:sleepyddl/hexo-theme-yilia.git) registered for path 'themes/yilia'
git submodule update //将子模块的远程仓库同步下来
git submodule update --init //克隆之后 子模块内没有内容,此时执行这条命令拿到远程的内容。相当于 init与update的组合
cd themes/hexo //子模块更新后,获取最新的
git pull origin master
checkout
git checkout hexo //切换到hexo分支 如果本地分支没有远程有 则自动跟踪
//Switched to a new branch 'hexo' Branch 'hexo'
//set up to track remote branch 'hexo' from 'origin'.