У меня есть настройка блога на страницах github с помощью Octopress. Я создал свой первый пост и могу просмотреть его на локальном хосте, используя rake preview
. Однако он не может развертываться на страницах github. Будучи новичком в git, мне трудно понять проблему.Не удалось выполнить развертывание на страницах Github с использованием октопресса
Запуск rake deploy
для развертывания на страницах github, следуя их documentation.
Я получаю сообщение:
## 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 -
Этот this question, я поставил мой 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
Как вы уже догадались, что я делаю это в одиночку, и нет соавторы (Дух! Блога). Это мой repo. Пожалуйста, дайте мне знать, если вам нужны какие-либо другие детали. Я мерзавец NEWB :) Спасибо
Редактировать: Я также получил письмо от GitHub говорил следующее:
The page build failed with the following error:
A file was included in
source/blog/archives/index.html
that is a symlink or does not exist in your_includes
directory.
Это случилось однажды, хотя я пытался развернуть несколько раз.
не работает для меня:/ Мое решение было первым, очень осторожно резервное копирование моего git-репо. А затем второй, удалите главную ветвь на github. Тогда я не стану проблемой без конфликтов (так как это новая ветка). –