【问题标题】:How do you update your github.io repo when changes are made on your local files?当对本地文件进行更改时,如何更新 github.io 存储库?
【发布时间】:2020-01-25 09:03:36
【问题描述】:

我最近注册了 github pages,以便我可以托管我购买的网站域。我创建了一个 repo,将我的本地文件添加到 repo 并将我的 github.io 重定向到我购买的新域。一切正常,但是,当我对本地文件进行更改时,如何使这些更改在我的 github 上也生效,以便将更改反映到我的网站上?

【问题讨论】:

  • 您提交并推送到远程。我建议您阅读 GitHub 上的基本教程。

标签: git github github-pages


【解决方案1】:

您只需要提交并推送您的更改,它就会生效。

提交更改:

git add --all

git commit -m "Several changes"

现在只需推送到您的分支:

git push -u origin your-branch

## Example: git push -u origin master

【讨论】:

    【解决方案2】:

    基本流程,

    git add <changed filename>
    git commit -m "Commit message, what are the changes"
    git push
    

    如果您要对实时应用进行更改,则应该使用分支。 https://rogerdudler.github.io/git-guide/

    【讨论】:

      猜你喜欢
      • 2019-11-24
      • 1970-01-01
      • 2010-11-29
      • 2018-11-10
      • 2016-07-08
      • 2021-04-06
      • 2013-06-13
      相关资源
      最近更新 更多