I installed Octopress in GitHub Pages.
And I clone the repository.
$ git clone [email protected]:my-name/my-name.github.io.git
$ git checkout source
And
$ rake setup_github_pages
I input my repository name.
And
$ rake gen_deploy
I got error
! [rejected] master -> master (non-fast-forward)
I resolve this problem, in GitHub delete my-name.github.io.git, and make same name repository and
$ rake gen_deploy
What is the best solution?
Without deleting the repository
Please keep in mind this is not considered best practice, but it may work for you.
The solution is to force a push on the master branch.
Edit the Rakefile
and look for this line:
system "git push origin #{deploy_branch}"
Alter the line by adding a plus (+) before the #{deploy_branch} tag:
system "git push origin +#{deploy_branch}"
Run the command
rake deploy
It should succeed.
Undo the edit you made to the Rakefile!
Idea for this solution came from reading this: https://stackoverflow.com/a/9629458/1369730
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With