簡體   English   中英

如何在 GitHub 頁面上更新已部署的 React 應用程序

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

最近我在 GitHub 頁面上部署了我的第一個 React 應用程序https://karan-dhingra.github.io/lct/

現在我更新了反應應用程序,我的更改沒有反映在 GitHub 頁面上。 但是在 Localhost 上一切都運行良好。 所以,請指導我如何在 GitHub 頁面上更新我部署的 React 應用程序。

只需要運行 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

因此,使用這些命令一切都會很好。

確保將代碼保存在 IDE 中。 使用“git status”命令保存檢查並提交並推送到 git 存儲庫后,更改將被反映

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM