I use a trick I got from this page: http://happygiraffe.net/blog/2009/07/04/publishing-a-subdirectory-to-github-pages/
You keep all of the gh-pages content in a directory in the master branch, from which it is copied to the gh-pages branch. I just run this script after I've updated the contents of the www/ directory: https://github.com/roban/CosmoloPy/blob/master/commit_www.bash The only problem I have with this system is remembering to run the the script before I push to github. -Roban On Feb 25, 6:25 pm, Adam Faulconbridge <afaulconbri...@googlemail.com> wrote: > Hello. I've been looking for a solution to a problem, but can't seem to find > one. I am new to git, so may be missing something. > > * I have a project hosted on GitHub > * The code is in the "master" branch. > * I also have web pages in the "gh-pages" branch. > * The documentation is auto-generated from the code (in this case by Sphinx > (http://sphinx.pocoo.org/), but it doesn't really matter how.) and this > includes a HTML version. > * I want the html auto-generated documentation to be in the "gh-pages" > branch so that it is published to the web. > * I do not want anything else to be in the "gh-pages" branch. > * I want to be able to generate new documentation from the "master" branch > code and put it in the "gh-pages" branch for publication. > * How do I do this? > > I've tried using cherry-pick but that looks for specific commits which isn't > what I want and is fiddly to use. > > I've tried using different .gitignore and excludesfiles configurations, but > cant get it to apply to one branch (as > describedhttp://cogniton-mind.tumblr.com/post/1423976659/howto-gitignore-for-d... > ) > > I've tried using git pull to pull copies of the documentation into the > gh-pages branch from the master branch, but that doesn't keep history. > > I could set up two local repositories and have a script copy things from one > to the other, but that seems inelegant to me. > > Any other suggestions / tips? Wouldn't think this would be too unusual a > workflow. -- You received this message because you are subscribed to the Google Groups "GitHub" group. To post to this group, send email to github@googlegroups.com. To unsubscribe from this group, send email to github+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/github?hl=en.