question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot push to newly created gh-pages branch

See original GitHub issue

Description:

Something is going wrong with the git commands of the releases/v3 action. Specifically I am receiving the following error:

fatal: invalid reference: origin/gh-pages

Context: I am slowly getting around to upgrading all my deployments to v3 and encountered an unusual bug. To fully reset everything, I deleted the gh-pages branch from my repo and then switched over the deployment code to v3. Commit one here, Commit two here.

Focusing on the second commit after I had realized I had made a mistake, it produced this log.

Happy to rerun the action or try things on my side just very confused by the bug since it seems to be a git failure but not sure how to solve considering the git command is being run by the github-pages-deploy-action itself.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
evamaxfieldcommented, Dec 6, 2019

Wow. Nice catch. @fennifith I just switched to actions/checkout@v1 and it works for me hopefully it works for you as well. Thanks! 🎉

2reactions
fennifithcommented, Dec 6, 2019

That was it! I was just testing commands locally, coming to the conclusion that something was off with git fetch creating branch refs. Thanks a ton for the help @JamesIves!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot push to github-pages - Stack Overflow
This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint:...
Read more >
gh-pages - npm
Calling this function will create a temporary clone of the current repository, create a gh-pages branch if one doesn't already exist, ...
Read more >
Getting Started with GitHub Pages - YouTube
Hey gang, in this tutorial I'll show you how to get up and running with GitHub pages to host your projects on the...
Read more >
Create gh-pages branch in existing repo - jf
Create /checkout an orphan gh-pages branch. An orphan branch is not connected to the other branches and commits, and its working tree has...
Read more >
How to Host Your Static Webpages on GitHub Pages
You can watch Getting Started on GitHub if these tools are new to you. ... to gh-pages 2 3on: 4 repository_dispatch: 5 push:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found