Skip to content

Your first push

The whole loop. Two steps will surprise you: push opens the pull request, and you never press a merge button.

Assumes you have installed garden and logged in.

A folder already on disk:

Terminal window
cd my-project
garden init

Existing files are preserved as untracked.

Or import from GitHub — --from takes owner/repo or a URL, --clone mounts it at ./web:

Terminal window
garden repo create web --from acme/web --clone

Something already in garden: garden clone web.

Terminal window
garden status
garden add .
garden commit -m "add rate limiting to the ingest endpoint"

There is no staging area. garden add tracks new files; garden commit records everything pending.

Terminal window
garden push

There is no garden pr create. push is stack-aware: it pushes the current commit and all its draft ancestors, bottom-up, opening or updating one pull request per commit. Each PR is diffed against its parent, so a reviewer sees one logical change at a time.

-m sets the top commit’s PR title on first push; otherwise each commit’s first message line is used.

Check what’s outstanding with garden stack or garden pr list.

Terminal window
garden review 42
garden review comment 42 --file src/api.go --line 88 -b "This needs a bound."
garden review submit 42 --approve

garden review 42 prints the diff with threads inline. Comments are drafts until you submit, so you can work through a whole diff and publish once. See Code review.

Terminal window
garden pr merge 42

This enqueues the PR. Once it is mergeable — owner approval, green CI, every thread resolved — the merge queue rebases it onto the current head, re-tests, and lands it.

Terminal window
garden pr checks 42
garden pr wait 42 --for merged

garden pr wait exits 0 when the condition is met and 124 on timeout, so it drops straight into a script or an agent loop.

Terminal window
garden pull

pull fetches and restacks, rebasing your remaining stack onto the new head. Commits that already landed drop out.

Terminal window
garden auth login
garden repo create web --from acme/web --clone
cd web
# ... edit ...
garden commit -m "add rate limiting"
garden push
garden review 42
garden pr merge 42