This may be a dumb question but I can’t find the answer. Basically, after deploying a React app to gh-pages, I want to push commit changes to the gh-pages branch. I get this message:
! [rejected] gh-pages -> gh-pages (non-fast-forward)
error: failed to push some refs to 'email@example.com:envincebal/react-leaderboard.git’
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push --help’ for details.
I try to use ‘git pull’ but end up with this message:
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> gh-pages
This doesn’t happen when I push changes on non-React projects. My question is how do you properly commit changes to gh-pages for React apps so that the branch is up to date with the master branch?