Skip to content
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
This repository was archived by the owner on Nov 18, 2021. It is now read-only.

The branch used for GitHub Pages should be configurable #212

@stuartpb

Description

@stuartpb

Right now the way GitHub Pages work is kind of inconsistent:

  • If the name of the repository is something.github.io, it pulls from the master branch.
  • If it's anything else, it pulls from the gh-pages branch.

In either case, it will create a virtual host for whatever domain you list in the CNAME file, as well as a directory under the user or organization on github.io.

The shortcoming of this means that, if you have a repo that exists only to be used for GitHub Pages, you have to use "gh-pages" as the name of your default branch (unless you're also using it as your github.io repo, in which case that will break and you need to use "master" instead).

(Also, from what I can tell with https://github.com/plushu/plushu.github.io, if you rename a repository to or from username.github.io, it loses all track of where it's supposed to pull from and everything just goes straight to hell.)

GitHub allows users to configure which branch of the repository acts as the default branch: GitHub should also allow users to choose which branch is used for files on GitHub Pages

Allowing users to more freely use other branches as for GitHub Pages (such as the master branch of a JavaScript library) would also make it much smoother to host your libraries directly from GitHub as a CDN (a feature users are themselves trying to hack with solutions like RawGit).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions