Answers for "upload react project to github"


upload react project to github

Make sure you have already created a repo in github.
In "package.json" file of project add - "homepage": ""
Run Install - "yarn add gh-pages"
In "package.json/scripts" add `"predeploy":"npm run build", "deploy":"gh-pages -d build"` 
Run "npm run build" to create the build
To push in git use following steps:
1) git init
2) git add -A
3) git commmit -m "first commit"
4) git remote add origin
5) git push -u origin master
Now in github repo create a new branch "gh-pages"
In settings -> github pages -> source -> branch -> gh-pages -> save
Run "npm run deploy"
*****************************voilà it's done!!*************************
Posted by: Guest on November-10-2020

deploy react app to github

echo "# instagram-clone" >>
git init
git add
git commit -m "first commit"
git branch -M main
git remote add origin
git push -u origin main
Posted by: Guest on April-24-2021

Code answers related to "upload react project to github"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language