def remove(self, key, force=False):
        """Remove the head reference to this key, so that it is no longer
        visible in the repo.  Prior commits and blobs remain in the repo, but
        detached.

        >>> repo.commit('foo', 'bar')
        >>> repo.remove('foo')
        >>> repo.committed('foo')
        False
        >>> repo.staged('foo')
        False

        :param key: The key to remove
        :type key: string
        :param force:
            (optional) Whether to remove the HEAD reference even if
            there is data staged in the index but not yet committed.  If force
            is true, the index entry will be removed as well.
        :type force: boolean

        :raises: :class:`StagedDataError jsongit.StagedDataError`
        """
        if force is True or self.staged(key) is False:
            del self._repo.index[key]
        elif force is False and self.staged(key):
            raise StagedDataError("There is data staged for %s" % key)
        self._repo.lookup_reference(self._key2ref(key)).delete()
dataset/ETHPy150Open talos/jsongit/jsongit/models.py/Repository.remove/original