Explain GitHub pages workflow

I am trying to understand the instructions about hosting on GitHub here:
https://gohugo.io/hosting-and-deployment/hosting-on-github/

I am able to do the initial setup with making /public a submodule.
However I am confused as to how I update my page in the future.
My thought was that I would do

rm -rf public
hugo
cd public
git add .
git commit -m "my message"
git push origin master

However, when I do this I get

fatal: in unpopulated submodule 'public'

Seems I am not understanding something here about how submodules work. Could someone explain?