I made a template sale website (gatsby / react). I cloned my template GitHub repo and changed the remote origin to a new private repo, pushing to which works fine.
I deploy to gh-pages with npm srcipt "deploy": "gatsby build --prefix-paths && gh-pages -d public"
The first time I ran this command it seemed to stall so I control c
'd out of it. Now, when I try to deploy I get the error "fatal: A branch named 'gh-pages' already exists."
git branch -a
shows:
remotes/origin/HEAD -> origin/master
remotes/origin/gh-pages
remotes/origin/master
But there is not a gh-pages branch on gitHub.
I tried rm -rf node_modules/gh-pages/.cache
didn't work.
Also, git push origin --delete gh-pages
which gave
"error: unable to delete 'gh-pages': remote ref does not exist".
I uninstalled and reinstalled gh-pages.
gh-pages
branch when trying to run thegh-pages
command. I switched back tomaster
to fix the problem. – Nepean