Love My Love

Clone Hugo To Other Desktop


First of all, I will never use or gitee for my blog repos deploy, they are not confortable to me, so sad, so bad.

My hugo have three repos:

  1. hugo(hugo resource, private repo) - root
  2. zozo(theme/zozo, private repo) - submodule
  3. 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!



1. Just for submodules folders empty

  1. make sure .gitmodule is correct.
  2. maybe .gitmodule sames right, but cannot work, git submodule sync.
  3. run git submodule init then git submodule update to update

2. Even not cloned

Just run git clone --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.


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.