# Fatal: 'upstream/gh-pages' is not a commit and a branch 'gh-pages' cannot be created from it

**URL:** <https://discourse.julialang.org/t/fatal-upstream-gh-pages-is-not-a-commit-and-a-branch-gh-pages-cannot-be-created-from-it/18026>\
**Category:** General Usage\
**Tags:** documenter\
**Created:** [November 26, 2018, 6:32pm UTC](https://discourse.julialang.org/t/fatal-upstream-gh-pages-is-not-a-commit-and-a-branch-gh-pages-cannot-be-created-from-it/18026 "2018-11-26T18:32:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![goedman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goedman/32/217_2.png) [@goedman](https://discourse.julialang.org/u/goedman)\
**Post date:** [November 26, 2018, 6:32pm UTC](https://discourse.julialang.org/t/fatal-upstream-gh-pages-is-not-a-commit-and-a-branch-gh-pages-cannot-be-created-from-it/18026/1 "2018-11-26T18:32:11Z")

</div>

Hi,

In a new, still unregistered, package I am running into above error when trying to publish documentation. This is, amongst other things, an exercise using Literate.jl.

I tried it a couple of times, including deleting the existing gh-pages branches a few times (like in below trace). I’ve used the Documenter v0.20 in a couple of other packages without problems, but in those cases existing gh-pages branches existed. I did also refresh the deploy key and DOCUMENTER\_KEY a few times.

Has anyone come across this issue?

Thanks,  
Rob

-------details----------

Documenter: building cross-references.  
Documenter: running document checks.

> checking for missing docstrings.  
> running doctests.  
> checking footnote links.  
> Documenter: populating indices.  
> Documenter: rendering document.  
> ?? TRAVIS\_REPO\_SLUG = “StanJulia/StatisticalRethinking.jl”  
> ?? should occur in “[GitHub - StatisticalRethinkingJulia/StatisticalRethinking.jl: Julia package with selected functions in the R package `rethinking`. Used in the SR2... projects.](http://github.com/StanJulia/StatisticalRethinking.jl.git)” (kwarg: repo)  
> ?? TRAVIS\_PULL\_REQUEST = “false”  
> ?? deploying if equal to “false”  
> ?? TRAVIS\_BRANCH = “master”  
> ?? TRAVIS\_TAG = “”  
> ?? deploying if branch equal to “master” (kwarg: devbranch) or tag is set  
> ?? git commit SHA = e44f989  
> ?? DOCUMENTER\_KEY exists = [secure]  
> ?? should\_deploy = [secure]  
> Documenter: setting up target directory.  
> Documenter: pushing new documentation to remote: [github.com/StanJulia/StatisticalRethinking.jl.git:gh-pages](http://github.com/StanJulia/StatisticalRethinking.jl.git:gh-pages).  
> Initialized empty Git repository in /tmp/tmprlCD6q/.git/  
> Warning: Permanently added the RSA host key for IP address ‘192.30.253.113’ to the list of known hosts.  
> From [github.com](http://github.com):StanJulia/StatisticalRethinking.jl

- [new branch] master → upstream/master  
fatal: ‘upstream/gh-pages’ is not a commit and a branch ‘gh-pages’ cannot be created from it  
Documenter: Checking out gh-pages failed with error: ErrorException(“failed process: Process(`git checkout -b gh-pages upstream/gh-pages`, ProcessExited(128)) [128]”)  
Documenter: Creating a new local gh-pages branch.  
Switched to a new branch ‘gh-pages’  
[gh-pages (root-commit) 883fc15] Initial empty commit for docs  
┌ Warning: creating symlink from `latest` to `dev` for backwards compatibility with old links. In future Documenter versions this symlink will not be created. Please update any links that point to `latest`.  
└ @ Documenter ~/.julia/packages/Documenter/e77Rr/src/Documenter.jl:544  
[gh-pages 2f697f1] build based on e44f989  
19 files changed, 31822 insertions(+)  
create mode 100644 dev/assets/arrow.svg  
create mode 100644 dev/assets/documenter.css  
create mode 100644 dev/assets/documenter.js  
create mode 100644 dev/assets/search.js  
create mode 100644 dev/index.html  
create mode 100644 dev/s2\_4.pdf  
create mode 100644 dev/s2\_5.pdf  
create mode 100644 dev/s2\_6.pdf  
create mode 100644 dev/s2\_7.pdf  
create mode 100644 dev/s3\_1.pdf  
create mode 100644 dev/search/index.html  
create mode 100644 dev/search\_index.js  
create mode 100644 dev/siteinfo.js  
create mode 100644 dev/snippets00/index.html  
create mode 100644 dev/snippets02/index.html  
create mode 100644 dev/snippets03/index.html  
create mode 100644 dev/snippets04/index.html  
create mode 120000 latest  
create mode 100644 versions.js  
remote:  
remote: Create a pull request for ‘gh-pages’ on GitHub by visiting:  
remote: [Sign in to GitHub · GitHub](https://github.com/StanJulia/StatisticalRethinking.jl/pull/new/gh-pages)  
remote:  
The command “julia --project=docs --color=yes docs/make.jl” exited with 0.

---

<div class="post-metadata">

**Author:** ![goedman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goedman/32/217_2.png) [@goedman](https://discourse.julialang.org/u/goedman)\
**Post date:** [November 26, 2018, 8:21pm UTC](https://discourse.julialang.org/t/fatal-upstream-gh-pages-is-not-a-commit-and-a-branch-gh-pages-cannot-be-created-from-it/18026/2 "2018-11-26T20:21:37Z")

</div>

Solved: Needed to switch the settings to build from gh-pages instead of from doc/…

---

<div class="post-metadata">

**Author:** ![bramtayl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bramtayl/32/3614_2.png) [@bramtayl](https://discourse.julialang.org/u/bramtayl)\
**Post date:** [December 20, 2018, 6:09am UTC](https://discourse.julialang.org/t/fatal-upstream-gh-pages-is-not-a-commit-and-a-branch-gh-pages-cannot-be-created-from-it/18026/3 "2018-12-20T06:09:34Z")

</div>

@goedman can you give a more detailed solution? I’m running into the same problem

---

<div class="post-metadata">

**Author:** ![goedman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goedman/32/217_2.png) [@goedman](https://discourse.julialang.org/u/goedman)\
**Post date:** [December 20, 2018, 1:43pm UTC](https://discourse.julialang.org/t/fatal-upstream-gh-pages-is-not-a-commit-and-a-branch-gh-pages-cannot-be-created-from-it/18026/4 "2018-12-20T13:43:02Z")

</div>

Hi @bramtayl,

In my case I went to the Github settings, then to options, scrolled down to the Github Pages section and noticed the source entry specified ‘master branch/docs’. I changed that to ‘gh-pages branch’.

Hope this helps!

Best, Rob
