如何使用 jekyll 主题 al-folio 更新 github 页面

问题描述 投票:0回答:1

我对使用 jekyll 和 github 还很陌生。我正在尝试使用 al-folio jekyll 主题并将其托管在 github 页面上。我使用 ubuntu 22.04 并按照本教程的说明进行操作。

一切都很顺利,我可以在github上成功部署它。请参阅此处

尽管,当我尝试更新页面时,我丢失了本地存储库中的所有 .md 文件,并且无法将更改推送到 github。我可以使用 jekllyserve 在本地看到更改,但我无法推送。

在说明中,我使用以下方式部署博客:

bin/deplpoy --user

但是,当我尝试更新时,此命令不起作用。我也使用命令:

git push -u origin gh-pages

然后我收到以下错误。

! [rejected]        gh-pages -> gh-pages (non-fast-forward)
error: failed to push some refs to 'https://github.com/reginaldodr/reginaldodr.github.io.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

我用谷歌搜索答案或其他教程,但我可以找到它。本教程没有展示如何更新更改。

有人可以给出指导或指出更完整的教程吗?我完全迷失了。

github jekyll jekyll-theme
1个回答
0
投票

启用模板提供的自动部署会更容易。你解决这个问题了吗?

阅读该消息,您可能通过 GitHub Web 进行了一些更改,然后忘记将这些更新检索到本地存储库,这就是它抱怨的原因

the tip of your current branch is behind hint: its remote counterpart
。要解决此问题,您应该在进行任何更改之前执行
git pull --rebase

© www.soinside.com 2019 - 2024. All rights reserved.