【问题标题】:How to Update Deployed React App on GitHub Pages如何在 GitHub 页面上更新已部署的 React 应用程序
【发布时间】:2021-08-24 00:12:03
【问题描述】:

最近我在 GitHub Pages 上部署了我的第一个 React 应用程序 https://karan-dhingra.github.io/lct/

现在我更新了 react 应用程序,我的更改没有反映在 GitHub 页面上。但是在 Localhost 上一切都运行良好。所以,请指导我如何更新我在 GitHub Pages 上部署的 React 应用程序。

【问题讨论】:

    标签: javascript reactjs github web-deployment github-pages


    【解决方案1】:

    我们只需要运行 3-4 个命令

    git init

    git remote ****************.git [这里我们将添加以.git结尾的存储库链接,您将在您的存储库的代码选项中找到它。

    npm run deploy[确保你已经安装了gh pages]

    git add .

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

    git push origin master

    所以,使用这些命令一切都会很好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-27
      • 2017-11-03
      • 2021-12-25
      • 1970-01-01
      • 2022-11-19
      • 1970-01-01
      • 2020-02-03
      • 2021-08-25
      相关资源
      最近更新 更多