by dfc · 14y ago · 0 comments
Am I missing something obvious?
mkdir my-project-pages
cd my-project-pages
git init
git remote add origin git@github.com:myusername/myproject.git
git pull origin gh-pages
Now just treat them as distinct "repos" and push independently. The basic idea here is that you're breaking up "clone" (which by default pulls everything) into its composite steps.What I've found is it's easier to create a free organization, and that way you can get a organization.github.com project created and host the pages there.... this is easier than juggling the spare branch. Obviously smaller starter projects should not do this, but you could use username.github.com/yourproject name and not keep the documentation on the branch just as easily.
Presto, no gh_pages branch, but all of the advantages of hosting web content.
./project <- Main repo
./project/project-ghpages <- same repo but gh-pages branch