def checkout(self, source, dest, **kwargs):
        """ Replace the HEAD reference for dest with a commit that points back
        to the value at source.

        >>> repo.commit('spoon', {'material': 'silver'})
        >>> repo.checkout('spoon', 'fork')
        >>> repo.show('fork')
        {u'material': u'silver'}

        :param source: The source key.
        :type source: string
        :param dest: The destination key
        :type dest: string
        :param author:
            (optional) The author of the commit.  Defaults to global author.
        :type author: pygit2.Signature
        :param committer:
            (optional) The committer of the commit.  Will default to global author.
        :type committer: pygit2.Signature

        :raises: :class:`StagedDataError <jsongit.StagedDataError>`
        """
        message = "Checkout %s from %s" % (dest, source)
        commit = self.head(source)
        self.commit(dest, commit.data, message=message, parents=[commit])
dataset/ETHPy150Open talos/jsongit/jsongit/models.py/Repository.checkout/original