How can I update github page using jekyll theme al-folio

904 Views Asked by At

I'm quite new on using jekyll and github. I'm trying to use al-folio jekyll theme and host it on github pages. I use ubuntu 22.04 and follow the instruction of this tutorial.

Everything went well and I could deploy it successfully on github. See here.

Although, when I try to update the page, I lost every .md files from my local repo and I can't push my changes for the github. I can see the changes locally using jeklly serve, but I can't push.

In the instruction, I deploy the blog using: bin/deplpoy --user

But, when I tried to update this command didn't work. I also use the command:

git push -u origin gh-pages

Then I got the following error.

! [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.

I google for answer or other tutorial but I could find it. The tutorial doesn't show how to update the changes.

Could someone give a direction or indicate a more complete tutorial? I'm totally lost.

1

There are 1 best solutions below

0
George Araújo On

It is easier if you enable the automatic deployment provided by the template. Have you managed to solve this?

Reading the message, you probably did some alterations via GitHub web, then forgot to retrieve these updates to your local repo, that's why it is complaining that the tip of your current branch is behind hint: its remote counterpart. To fix this, you should do git pull --rebase before doing any changes.