Wednesday, July 13, 2022

[FIXED] How to Update Deployed React App on GitHub Pages

Issue

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.


Solution

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.



Answered By - Karan
Answer Checked By - David Goodson (PHPFixing Volunteer)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.