Confusion on sequence of operations to publish book online
See original GitHub issue[disclaimer: I’m a total git newbie and this information might be very obvious to your other users. Apologies for stupid questions]
Is your feature request related to a problem? Please describe.
I’m a little confused on the order of steps required to host a book online, make local edits, and re-host it online. I understand first building the book locally (explained here), and then cloning an empty repository (step 3 here). Step 4 on the latter page is to copy the local files to the local repository. Step 5 is then to push those to the master branch of the remote repository. Cool. So far, I have two folders on my desktop, one called mylocalbook and one called myonlinebook.
Then we get to GitHub Pages (covered here). The first step is to run ghp-import -n -p -f mylocalbook/_build/html. My first question is what the current working directory should be when I run that command? When I run it from the desktop (the parent of /mylocalbook and /myonlinebook), I get an error stating fatal: 'origin' does not appear to be a git repository, which I think makes sense since Desktop is not a git repository. If I should first point the directory to myonlinebook, should I instead do something like ghp-import -n -p -f /Users/.../Desktop/mylocalbook/_build/html?
My second question is whether I should be doing steps 4 and 5 discussed above every time I re-build the book? My understanding is that ghp-import sends things from the local book to the online repository, so I don’t quite see why I would need to (though I’m probably missing something).
So to summarize:
- Should the cwd be
myonlinebook(or whatever) when runningghp-import? - Should I re-copy and re-push every time I re-build a book?
Thanks so much!
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)

Top Related StackOverflow Question
Oh and btw there’s #888 coming soon
Awesome features! Thanks so much to you both.