commit(newCheckpoint) {
        if (newCheckpoint === this.history[this.index]) {
            this.cancelCommitBeingWorkedOn();
            return;
        }
        this.isWorkingOnCommit = false;
        this.index += 1;
        this.history.splice(this.index, this.history.length - this.index);
        this.history.push(newCheckpoint);
        this._changes.send(newCheckpoint);
        this._latestActiveCommit.set(newCheckpoint);
    }
Throws away future states, appends the given state, and marks it as the current state
@param {*} newCheckpoint
@returns {void}