Skip to content

garden init

Turn a folder into a garden repository

Terminal window
garden init [path]

Create a new repository and mount this folder as its working copy.

Creates an empty repository server-side and mounts the current folder (or the given path) as its virtual filesystem. Existing files are preserved and show up as untracked changes — commit and push them to populate the repo:

garden init garden status # your files, untracked garden add . && garden commit -m “initial import” garden push

If the repository already exists but has no commits — you created it on the web first — this adopts it as the folder’s remote instead of failing. Pass –adopt to skip the confirmation.

The repository name defaults to the folder name; use –name to override.

Flag Type Default Description
--adopt bool Adopt an existing empty repository without confirming
--name string Repository name (defaults to the folder name)
-o, --org string Organization (defaults to your personal workspace)
--target string Garden backend to talk to (prod|dev); defaults to the checkout’s own target