Search code examples
javascriptreactjsgitgithubnetlify

Committing changes on the website after deploying it in netlify


I've build a static react website using create-react-app and deployed it in netlify using git and github. Turns out, I've to make a small change in my website now. What should I do so that the changes reflect on the already deployed site. I committed changes in github but the change is not showing in the live deployed url.


Solution

  • You can commit a new version of your website easily. after editing or changing the file in you need to use

    git add --all
    

    and commit the file by the following command.

    git commit -m"you can add you commit message here'
    

    after these steps, you can add the remote by the following command.

     git remote add remote-name https://repo-link-here..
    

    if you already added remote you can skip the step just top of this sentence.

    after that, you can push the committed branch by the following command

    git push remote-name branch
    

    the default name of remote is origin the default branch is master you can also use the default names also.