.. seealso:: :attr:`branch`

def branch(self, branch):
        '''
        .. seealso:: :attr:`branch`
        '''

        if not branch:
            branch = self.__mbranch
        tracking = (
            ''
            if branch in self._get_branch(remotes=True).get('out') else
            '-B'
        )
        self._checkout(treeish='%s %s' % (tracking, branch))