Github 添加 submodule 子模块

主仓库为 hugo-quan,在主仓库的 themes 文件夹下 添加仓库 hugo-theme-quan 为子模块。

同步远程仓库到本地

git clone https://github.com/happyet/hugo-quan.git

本地仓库配置 git 及 submodule

cd hugo-quan
git init
git submodule add https://github.com/happyet/hugo-theme-quan.git themes/Quan
git submodule init
git submodule update --init --recursive --remote

同步完 submodule 后同步整个仓库到 github

git add .
git commit -m "Add submodule"
git push