Pull any site into a git repo

As a first step in the toolchain for containerizing emergence site, this tool provides a way to connect to any existing emergence site and pull its entire VFS tree into a local git tree: https://www.npmjs.com/package/@emergence/source-http-legacy

Example

npm install -g @emergence/source-http-legacy
git init my-site-repo
cd my-site-repo
emergence-source-http-legacy pull mysite.example.org

The script will download a full manifest of the site’s VFS first, download files as needed, and then build a complete tree. The SHA1 hash of the resulting tree will be the final output of the command. To use in scripting, add the --quiet option to suppress all progress output

With this tree, you could then create a commit:

git commit-tree -m "Initial commit of mysite.example.org" <tree-hash>

And then set a branch to this new commit:

git update-ref refs/heads/master <commit-hash>