Skip to content
garage
Esc
navigateopen⌘Jpreview

Initialize an empty project

Create a garage repository and connect it to an empty local directory.

Use garage init in a directory with no commits. You must be signed in and have an active organization.

mkdir hello-world
cd hello-world
garage init
printf '# Hello\n' > README.md
git add README.md
git commit -m "Initial commit"
git push -u origin main

The directory name becomes the repository name when you omit [name].

Confirm the configured remote:

git remote get-url origin

Use garage init another-name to choose a different repository name. The command refuses a directory with commits or a non-garage origin. Use garage repos import for an existing GitHub repository.

See the garage init reference for its options and constraints.

Was this page helpful?