Git and Github help needed

Hey everyone,
happy new year!
I need help with Git and Github. So, I have got a website which I pushed into Github and the work was done in the main branch.

Then, I created a gh-pages branch via Github. I didn’t use the git checkout gh-pages command for it. Like magic, my website was up and running as it was deployed through gh-pages.

Unfortunately, some of the requirements in the project got changed and I needed to update my main branch. I pushed my code into Github. I thought my deployed website will be updated too, but it’s not.

Can you help me to figure out about how should I update my gh-pages?

You would push your changes to main then deploy it again.

check out this article, should help How to deploy React App to GitHub Pages - DEV Community

If your website is based on your GitHub Pages branch, then you will need to update that branch in order to see changes. You can either commit your changes within the branch or you can merge or rebase your branch from main.

1 Like