Hugo on GitHub gh-pages

Dear All,

I am trying to deploy the example of Hugo blog on github pages. However, I have some difficulties. In the section Configure git Workflow, when I issue the command git add . all the files and directories are added to the commit and not only the file. Therefore, when I issue git push origin gh-pages all the files and directories are pushed to the gh-pages branch. I do not think this is wanted right? We want only the file to be pushed to the gh-pages branch.

Am I correct?


I am following literally the instructions and they do not seem to work. After I issue

git subtree add --prefix=public gh-pages --squash

I get

Working tree has modifications. Cannot add.

Any idea if these instruction are not updated?

I just ran into that same issue. I ended up blowing my repo away, deleting my .git directory and starting over. I found much more success using this instruction set, although it is for your main user account on github, not project pages.