After reading about the ipfs files command, I finally understood that it was it’s own virtual root. After playing with it a little bit I had a messy virtual root and tried to find a way to reset it back to a clean slate.
My first instinct was to try
ipfs files rm -r /, but that errors with
cannot delete root, which I don’t understand why it’s not allowed. Is there a way to reset it without manually typing
ipfs files rm <name> for everything in root?
A related question I had was is it possible to set your virtual root to point at a specific hash? For instance you have the hash of a pre-existing directory tree in IPFS and you want that to be your ‘initial state’, and start working on it. Is it possible to set your root
/ to point at that hash, without manually doing
ipfs files cp for every item in that tree’s root into yours?