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 #24538

Merged
merged 7 commits into from
Jun 10, 2020
Merged
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 the `master` branch. So if you use `master` for development you need to do one of these:
>
> - Change the default branch from `master` to something else, and use `master` as a site deployment directory only:
> 1. To create a new branch called `source` run this command:
> `git checkout -b source master`
> 2. Change the default branch in your repository settings ("Branches" menu item) from `master` to `source`
> - Have a 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