lib/middleman-deploy/commands.rb in middleman-deploy-0.0.8 vs lib/middleman-deploy/commands.rb in middleman-deploy-0.0.9

- old
+ new

@@ -145,14 +145,12 @@ `git remote rm origin` `git remote add origin #{remote}` end end - `git fetch origin` - - #if there is a remote branch with that name, reset to it, otherwise just create a new one - if `git branch -r`.split("\n").keep_if{ |r| r =~ Regexp.new(branch,true) }.count > 0 - `git reset --hard origin/#{branch}` + #if there is a branch with that name, switch to it, otherwise create a new one and switch to it + if `git branch`.split("\n").keep_if{ |r| r =~ Regexp.new(branch,true) }.count > 0 + `git checkout #{branch}` else `git checkout -b #{branch}` end `git add -A`