Add git submodule (bad rendering site)

After having followed step by step the construction of my site with the instructions on the site of hugo, at the entry “add submodule” at the first command it comes out like this

$ git submodule add -b master git@github.com:saso94/saso94.github.io.git public && git commit -m “added submodule”
Cloning into ‘C:/Users/trunf/Siti/SebastianoTT/public’…
warning: You appear to have cloned an empty repository.
fatal: ‘origin/master’ is not a commit and a branch ‘master’ cannot be created from it
Unable to checkout submodule ‘public’

later, after repeating the command:

$ git submodule add -b master git@github.com:saso94/saso94.github.io.git public && git commit -m “added submodule”
‘public’ does not have a commit checked out

the public folder was created, but the .gitmodules file was not added. in my case, after completing the procedure, before trying to access the site, I repeated the command

$ git submodule add -b master git@github.com:saso94/saso94.github.io.git public && git commit -m “added submodule”

and this is the output:

Adding existing repo at ‘public’ to the index
warning: LF will be replaced by CRLF in .gitmodules.
The file will have its original line endings in your working directory
[master 7388896] added submodule
2 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 public

this add the file .gitmodules on the folder. now run the deploy file to update:

$ ./deploy.sh “commit here”

$ git push

this is the output of “git push”

Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 4 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 436 bytes | 145.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To GitHub - saso94/SebastianoTT
d120436…7388896 master → master

now, running the site and the problem of bad rendering has been solved.

however, I have to thank the hugo forum for helping me solve many small problems.