Jekyll not pushing to gh-pages branch

final problem for the weekend is when I try and push I get

error: src refspec gh-pages does not match any.

im either going to push an additional server or rsync in re comments.

Travis checks out a shallow clone, so your local copy on the build VM does not know about the gh-pages branch, which is why you’re getting an error throw. Try fetching the branch with

git fetch --unshallow

Right before running git push. Then, to get access to all the branches on your origin:

git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch origin

Or just specify

  depth: false

to do a full clone.

1 Like


Ah, yes very true, and great catch!