Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning in docs before bumping master branch #1

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/docs/how-gatsby-works-with-github-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ When you run `npm run deploy` all contents of the `public` folder will be moved

For a repository named like `username.github.io`, you don't need to specify `pathPrefix` and your website needs to be pushed to the `master` branch.

> :warning: Keep in mind that Github Pages forces deployment of user\organization pages to master branch. So if you use master branch for development you need to do one of this:
>
> - change the default branch from master to something else, and use master just as site deployment directory:
> 1. to create new branch called `source` run this command:
> `git checkout -b source master`
> 2. change default branch in repository settings ("Branches" menu item) from master to source
> - have separate repository for your source code (so <username>.github.io is used only for deployment and not really for tracking your source code)

```json:title=package.json
{
"scripts": {
Expand Down