Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use a branch other than master for User Github Pages

Github pages is nice, but it requires that the static files you wish to show be in the master branch. This is problematic for me because I intend to generate the blog post files from source code, and that code is what I'd like in master. Github for Project pages uses a gh-pages branch. Is there some way I can tell github to use that branch for a User pages repo?

like image 860
Jack Avatar asked Oct 30 '22 23:10

Jack


1 Answers

There is no way to do this, as the required branch names are hard-coded into Github's pages implementation. One thing you could do is create a project page and treat it as a user page, which works even better if you set up a custom domain.

A simple workaround would be to create a branch with a different name and treat it as your master branch. It won't be named "master", but in the end every branch looks the same to Git anyway, so it's just an issue of semantics.

like image 178
Maximillian Laumeister Avatar answered Nov 15 '22 06:11

Maximillian Laumeister