The @ROOT path in this script is set to the present working directory. My personal version is set to the full path to my jekyll _posts directory.
I have it pushing the new blog post to an origin remote in the master branch. You might want to change that to a gh-pages branch instead.