I have recently started using a GitHub repository to work on a personal web project, since GitHub allows me to host a website via GitHub Pages.
Is there a way to view a separate branch of this web project in my browser, just like I can view the master branch by accessing the URL [username].github.io
? Otherwise, I find it difficult to really make use of the GitHub workflow since I'd have to commit changes to the website directly to the master in order to view them in the browser rather than reviewing changes in a separate branch.
Not that I can see. You can only view pages from:
master
, ormaster:/docs
But each time, GitHub pages will reflect the content of one source, not giving an easy way to switch between branches.
A workaround would be to have a separate account, for a separate
[username-review].github.io
domain, allowing you to publish first in that second site, before pushing to the first one.