I had deployed me react webpage successfully in the main
branch. There are my main source files, take a look Main branch. And after deployment, branch gh-pages
has all necessary files containing like a static folder and all... take a look here gh-pages branch.
But whenever I change in the main
branch, it does not reflect the webpage. Is there any way to push all my changes??
I am unable to push changes to the gh-pages
branch as I am afraid because it is having totally different files.
How can I do these changes??
I had followed these git commands, but it didn't work
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes
$ git checkout master // return to the master branch
Referred from here
Thanks in advance...
Make sure you have these scripts in your package.json file, then you can just run npm run deploy
"scripts": {
//...
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
}
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments