code: def rebase(self, target_branch):
          
          current_branch = self.repo.active_branch
  
          arguments = (
                  ([self.config('git-up.rebase.arguments')] or []) +
                  [target_branch.name]
          )
          try:
              self._run('rebase', *arguments)
          except GitError as e:
              raise RebaseError(current_branch.name, target_branch.name,
                                **e.__dict__)
docs: Rebase to target branch.