git reset --hard origin/master will only work if you did git push origin master on master before running gh-pages-deploy. it would be nice to either find a way to not rely on origin/master in this way or to at least detect that master has unpushed commits and warn the user about it maybe