code: def rebase(upstream, branch=None):
      
      rebase_branch = branch and branch or current_branch()
      with git_continuer(run, 'rebase --continue', no_edit=True):
          stdout = run('rebase %s %s' % (upstream, rebase_branch))
          return 'Applying' in stdout
docs: Rebase branch onto upstream
  
      If branch is empty, use current branch