Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Octopress pushing error to GitHub

I'm trying to push an octopress to github page,everything has worked fine up to now but when i do the rake deploy command after displaying octopress files i get the following error

To [email protected]:rukshn/rukshn.github.io.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:rukshn/rukshn.github.io.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

what's the problem?

like image 628
rksh Avatar asked Oct 27 '13 14:10

rksh


3 Answers

Since this is the master branch, i.e., the one running your generated pages, you need to drop into the _deploy directory, then do the git pull origin master. Somehow your deploy directory has gotten out of sync. Do you have more than one local repo you write to and deploy from? (Say on different machines...) If you do, then you should always make sure to sync your the sources on the various repos as well.

like image 121
tamouse Avatar answered Nov 15 '22 14:11

tamouse


do

cd _deploy
git reset --hard origin/master
cd ..

and try again

rake generate
rake deploy
like image 36
slavik Avatar answered Nov 15 '22 15:11

slavik


Try:

git checkout source

rake gen_deploy

like image 36
Benjamin Tan Wei Hao Avatar answered Nov 15 '22 15:11

Benjamin Tan Wei Hao