Skip to content
Advertisement

How to Update Deployed React App on GitHub Pages

recently I have deployed my first React App on GitHub Pages https://karan-dhingra.github.io/lct/

Now I updated react app and my changes are not reflected on GitHub Pages. But everything was working well on Localhost. So, please guide me on how can I update my deployed React App on GitHub Pages.

Advertisement

Answer

Just we need to run 3-4 commands

git init

git remote ****************.git [ Here we will add our repository link ending with.git you will found it in the code option in your repo.

npm run deploy [Make sure you have installed gh pages first]

git add .

git commit -m "Here you write message while committing, you can write anything here"

git push origin master

So, with using these commands everything will work well.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement