I have setup a setup a blog on github pages using Octopress. I have created my first post, and am able to view it on localhost using rake preview
. However it is failing to deploy to github pages. Being new to git, am having trouble understanding the problem.
I run rake deploy
to deploy to github pages, following their documentation.
I get this message:
## 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 -
Following this question, I have set my branch.master.remote
to origin
.
To resolve the non-fast-forward situation, I performed did git push origin master
. After this, I was able to push code to github, but not deploy to github pages using rake deploy
.
I am going to paste my git config file here, I don't know if this is going to help.
[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
As you may have guessed, I am doing this alone, and there are no collaborators (duh! blog). This is my repo. Please let me know if you need any other details. I am a git newb :) Thanks
Edit: I also got an email from github saying the following:
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.
This happened once, although I've tried deploying multiple times.