octopress / deploy

Deployment for Octopress and Jekyll blogs.
MIT License
75 stars 23 forks source link

deployment to git should check if branch name has changed #64

Open garfieldnate opened 9 years ago

garfieldnate commented 9 years ago

I first ran deploy to the gh-pages branch, then re-read the documentation and realized that it should be master. When I changed the deploy branch, however, I could no longer deploy. I would always get this error:

error: src refspec master does not match any. 

This took a while to figure out, but it turned out that the git repository created by octopress deploy was saved in .deploy, and the branch was still gh-pages. Git was failing because the master branch did not exist. To fix this, I had to delete the .deploy directory manually and rerun octopress deploy.

It would be nice if the deploy script checked that the branch in the .deploy directory matched the branch given by the current value of the branch parameter.