lib/dev_flow/girc.rb in dev_flow-0.0.7 vs lib/dev_flow/girc.rb in dev_flow-0.0.8
- old
+ new
@@ -130,10 +130,11 @@
# remote from a specified remote ref
def rebase! remote = 'origin', branch = 'develop'
cb = self.current_branch
stashed = false
unless self.wd_clean?
+ info "Stash your local changes"
self.stash!
stashed = true
end
if branch == self.current_branch
@@ -146,15 +147,15 @@
rslt = `#{@git} checkout #{branch}`
raise "Checkout failed: #{rslt}" unless $?.success?
info "Update branch from remote"
# rslt = `#{@git} pull --rebase #{remote} #{branch}`
rslt = `#{@git} pull #{remote} #{branch}`
- raise "Rebase pull for #{branch} failed: #{rslt}" unless $?.success?
+ raise "Pull for #{branch} failed: #{rslt}" unless $?.success?
info "Switch back to branch #{cb}"
`#{@git} checkout #{cb}`
- info "Rebase from #{branch}"
- rslt = `#{@git} rebase #{branch}`
- raise "Rebase with #{branch} failed: #{rslt}" unless $?.success?
+ info "Merge from #{branch}"
+ rslt = `#{@git} merge #{branch}`
+ raise "Merge with #{branch} failed: #{rslt}" unless $?.success?
end
self.stash_pop! if stashed
end