Following this tutorial, I created my own jekyll website hosted by github. I used a different template, namely this one, however. I forked this template, installed git, and cloned the repository into a folder called “Website” on my computer. I personalized the template in the “Website”-folder and was able to preview it using bundle exec jekyll serve
.
Then I wanted to get my website up and running. The command git status
showed the changes I expected. I then wrote git add <some file shown in git status>
, git commit
and then git push
. At some point I got the error message:
Your branch and ‘origin/master’ have diverged,
and have 1 and 1 different commits each, respectively.
I tried various things. I wrote git reset --hard origin/master
. This reset all local changes. Luckily, in case anything went wrong, I had copied the “Website”-folder beforehand. I deleted the reset folder and kept the copy of the original folder, renaming it “Website”.
Now when I cd to this folder and write git status
, I again get the error:
Your branch and ‘origin/master’ have diverged,
and have 1 and 1 different commits each, respectively.
(use “git pull” to merge the remote branch into yours)
nothing to commit, working tree clean
How do I get my website up and running?
The git pull
command gives “fatal: Need to specify how to reconcile divergent branches.”
Anna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.