The "reparent" command:

Usage: fossil reparent [OPTIONS] CHECK-IN PARENT ...

Create a "parent" tag that causes CHECK-IN to be interpreted as a
child of PARENT.  If multiple PARENTs are listed, then the first is
the primary parent and others are merge ancestors.

This is an experts-only command.  It is used to patch up a repository
that has been damaged by a shun or that has been pieced together from
two or more separate repositories.  You should never need to reparent
during normal operations.

Reparenting is accomplished by adding a parent tag.  So to undo the
reparenting operation, simply delete the tag.

   --test           Make database entries but do not add the tag artifact.
                    So the reparent operation will be undone by the next
                    "fossil rebuild" command.
   --dryrun | -n    Print the tag that would have been created but do not
                    actually change the database in any way.