First of all, I will never use coding.net or gitee for my blog repos deploy, they are not confortable to me, so sad, so bad.
My hugo have three repos:
- hugo(hugo resource, private repo) - root
- zozo(theme/zozo, private repo) - submodule
- public(html files, public repo) - submodule
Maybe, you have this structure too.
I clone my repo hugo to my other desktop, but theme and public folders are blank.
Now, fix it!
Reference:
https://git-scm.com/book/zh/v2/Git-%E5%B7%A5%E5%85%B7-%E5%AD%90%E6%A8%A1%E5%9D%97
https://gohugo.io/hosting-and-deployment/hosting-on-github/
How:
1. Just for submodules folders empty
- make sure
.gitmoduleis correct. - maybe
.gitmodulesames right, but cannot work,git submodule sync. - run
git submodule initthengit submodule updateto update
2. Even not cloned
Just run git clone https://github.com/wedojava/blog.git --recurse-submodules, after this, submodules will be fetched done.
then, you may make some changes, need push, just do it, but notion that, cd your submodule folders and push them first may give you best wishes.
Issue:
If some submodule cannot push and at the weird branch, just go to that path, run git switch master then git push or git pull.
Yes, just so easy as there. Here you go.