# File lib/git-up.rb, line 222 def rebase(target_branch) current_branch = repo.head arguments = config("rebase.arguments") output, err = repo.git.sh("#{Grit::Git.git_binary} rebase #{arguments} #{target_branch.name}") unless on_branch?(current_branch.name) and is_fast_forward?(current_branch, target_branch) raise GitError.new("Failed to rebase #{current_branch.name} onto #{target_branch.name}", output+err) end end