在我學會將檔案提交到 github 之后。現在我嘗試通過運行語法更新 github 上的檔案
git push -u origin main
并輸出訊息
Everything up-to-date
Branch 'main' set up to track remote branch 'main' from 'origin'.
當我再次檢查 github 時,我推送的檔案根本沒有變化

這是我的本地檔案

請幫助我,我是 github 的新手
uj5u.com熱心網友回復:
你先答應了嗎?使用 git,您需要先提交更改,這就像將每個版本保存在本地一樣。然后,當您推送時,您將所有版本發布到遠程 (github)。
請嘗試以下操作:
git status
如果它告訴您未跟蹤的檔案,請使用:
git add <filepath>
然后:
git commit -m "<some commit message>"
這會將您的更改保存為本地提交,您現在可以使用之前使用的 push 命令將此提交推送到 github。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/313250.html
標籤:github
上一篇:忽略像配置這樣的檔案而不洗掉?
