Я установил настройку блога на страницах github с помощью Octopress. Я создал свой первый пост и могу просмотреть его на localhost с помощью rake preview
. Однако он не может развертываться на страницах github. Будучи новичком в git, мне трудно понять проблему.
Я запускаю rake deploy
для развертывания на страницах github, следуя документации.
Я получаю это сообщение:
## Deploying branch to Github Pages
## Pulling any updates from Github Pages
cd _deploy
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.
If you often merge with the same branch, you may want to
use something like the following in your configuration file:
[branch "master"]
remote = <nickname>
merge = <remote-ref>
[remote "<nickname>"]
url = <url>
fetch = <refspec>
See git-config(1) for details.
cd -
rm -rf _deploy/blog
rm -rf _deploy/robots.txt
rm -rf _deploy/javascripts
rm -rf _deploy/stylesheets
rm -rf _deploy/sitemap.xml
rm -rf _deploy/favicon.png
rm -rf _deploy/atom.xml
rm -rf _deploy/index.html
rm -rf _deploy/images
rm -rf _deploy/assets
## Copying public to _deploy
cp -r public/. _deploy
cd _deploy
## Committing: Site updated at 2014-01-25 20:13:51 UTC
# On branch master
nothing to commit (working directory clean)
## Pushing generated _deploy website
To [email protected]:slmnm/slmnm.github.io.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:slmnm/slmnm.github.io.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
## Github Pages deploy complete
cd -
Следуя этому вопросу, я установил branch.master.remote
origin
.
Чтобы решить проблему без перемотки вперед, я выполнил git push origin master
. После этого мне удалось нажать код на github, но не развертывать его на github-страницах с помощью rake deploy
.
Я собираюсь вставить мой файл конфигурации git здесь, я не знаю, поможет ли это.
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "octopress"]
url = git://github.com/imathis/octopress.git
fetch = +refs/heads/*:refs/remotes/octopress/*
[branch "source"]
remote = origin
merge = refs/heads/master
[remote "origin"]
url = [email protected]:slmnm/slmnm.github.io.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
Как вы, возможно, догадались, я делаю это в одиночку, и нет соавторов (блог duh!). Это мой repo. Пожалуйста, дайте мне знать, если вам нужны какие-либо другие детали. Я git newb:) Спасибо
Изменить: я также получил электронное письмо от github, сказав следующее:
Ошибка сборки страницы со следующей ошибкой:
Файл был включен в
source/blog/archives/index.html
, который является symlink или не существует в вашем каталоге_includes
.
Это произошло один раз, хотя я попытался развернуть несколько раз.