gh-pages-deploy
gh-pages-deploy copied to clipboard
have to `git push origin master` first before `gh-pages-deploy`
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
I think detecting might be the best route for now, the case you describe is the only one that has caused it to fail and leave me in the gh-pages branch. like in #6.
It may also make sense to not be tied specifically to master. Though the common practice is to use master as your main/pure branch not everyone does this. It might be worth it to allow a "main branch to pull from" to either be specified in the package.json config object, or allow it to be based in as a cl option. Then just default to master if nothing is specified.
I think it makes more sense to do git stash before changing branches etc, then do git stash pop last
otherwise you lose your work
How about failing if you have a modified working directory?
On Thu, May 28, 2015 at 3:36 PM, kumavis [email protected] wrote:
otherwise you lose your work
— Reply to this email directly or view it on GitHub https://github.com/meandavejustice/gh-pages-deploy/issues/7#issuecomment-106619241 .
@kumavis @maxogden I think I like letting the user take care of their own changes by notifying and failing on a modified working directory.
maybe the technique used in this module is relevant https://www.npmjs.com/package/odb
On Sat, May 30, 2015 at 2:38 PM, Dave Justice [email protected] wrote:
@kumavis https://github.com/kumavis @maxogden https://github.com/maxogden I think I like letting the user take care of their own changes by notifying and failing on a modified working directory.
— Reply to this email directly or view it on GitHub https://github.com/meandavejustice/gh-pages-deploy/issues/7#issuecomment-107090555 .
heh nice.
i fixed this issue like so:
"deploy": "git push origin master && gh-pages-deploy"
but failing on un-merged/un-pushed work would be better. Would you accept a PR that did such a thing? I would be happy to take a crack at it.
hey @coleww I seem to have missed this comment(sorry!). I would definitely except a PR.