def rebase(self, branch: Optional[str]=None, commit: Optional[str]=None, rebase_source: Optional[str]=None, message: Optional[str]=None, author: Optional[str]=None) -> dict:
    'Rebase the current branch onto the specified remote branch. Need to specify one of \'branch\',\'commit\' or the \'rebase_source\'.\n\n        Notes\n        -----\n        The "remote" repo can live in the local database.\n\n        Parameters\n        ----------\n        branch : str, optional\n            the branch for the rebase\n        rebase_source : str, optional\n            the source branch for the rebase\n        message : str, optional\n            the commit message\n        author : str, optional\n            the commit author\n\n        Raises\n        ------\n        InterfaceError\n            if the client does not connect to a database\n\n        Returns\n        -------\n        dict\n\n        Examples\n        --------\n        >>> client = WOQLClient("https://127.0.0.1:6363/")\n        >>> client.rebase("the_branch")\n        '
    self._check_connection()
    if ((branch is not None) and (commit is None)):
        rebase_source = '/'.join([self.team, self.db, self.repo, 'branch', branch])
    elif ((branch is None) and (commit is not None)):
        rebase_source = '/'.join([self.team, self.db, self.repo, 'commit', commit])
    elif ((branch is not None) or (commit is not None)):
        raise RuntimeError('Cannot specify both branch and commit.')
    elif (rebase_source is None):
        raise RuntimeError("Need to specify one of 'branch', 'commit' or the 'rebase_source'")
    if (author is None):
        author = self._author
    if (message is None):
        message = f'Rebase from {rebase_source} by Python client {__version__}'
    rc_args = {'rebase_from': rebase_source, 'author': author, 'message': message}
    result = requests.post(self._rebase_url(), headers={'user-agent': f'terminusdb-client-python/{__version__}'}, json=rc_args, auth=self._auth())
    return json.loads(_finish_response(result))
Rebase the current branch onto the specified remote branch. Need to specify one of 'branch','commit' or the 'rebase_source'.

Notes
-----
The "remote" repo can live in the local database.

Parameters
----------
branch : str, optional
    the branch for the rebase
rebase_source : str, optional
    the source branch for the rebase
message : str, optional
    the commit message
author : str, optional
    the commit author

Raises
------
InterfaceError
    if the client does not connect to a database

Returns
-------
dict

Examples
--------
>>> client = WOQLClient("https://127.0.0.1:6363/")
>>> client.rebase("the_branch")
def rebase(self, branch: Optional[str]=None, commit: Optional[str]=None, rebase_source: Optional[str]=None, message: Optional[str]=None, author: Optional[str]=None) -> dict:
    'Rebase the current branch onto the specified remote branch. Need to specify one of \'branch\',\'commit\' or the \'rebase_source\'.\n\n        Notes\n        -----\n        The "remote" repo can live in the local database.\n\n        Parameters\n        ----------\n        branch : str, optional\n            the branch for the rebase\n        rebase_source : str, optional\n            the source branch for the rebase\n        message : str, optional\n            the commit message\n        author : str, optional\n            the commit author\n\n        Raises\n        ------\n        InterfaceError\n            if the client does not connect to a database\n\n        Returns\n        -------\n        dict\n\n        Examples\n        --------\n        >>> client = WOQLClient("https://127.0.0.1:6363/")\n        >>> client.rebase("the_branch")\n        '
    self._check_connection()
    if ((branch is not None) and (commit is None)):
        rebase_source = '/'.join([self.team, self.db, self.repo, 'branch', branch])
    elif ((branch is None) and (commit is not None)):
        rebase_source = '/'.join([self.team, self.db, self.repo, 'commit', commit])
    elif ((branch is not None) or (commit is not None)):
        raise RuntimeError('Cannot specify both branch and commit.')
    elif (rebase_source is None):
        raise RuntimeError("Need to specify one of 'branch', 'commit' or the 'rebase_source'")
    if (author is None):
        author = self._author
    if (message is None):
        message = f'Rebase from {rebase_source} by Python client {__version__}'
    rc_args = {'rebase_from': rebase_source, 'author': author, 'message': message}
    result = requests.post(self._rebase_url(), headers={'user-agent': f'terminusdb-client-python/{__version__}'}, json=rc_args, auth=self._auth())
    return json.loads(_finish_response(result))