git-artifact

Quick start

Create, save, and publish an Artifact in a few steps.

This example creates an Artifact for auth redesign notes and publishes the storage branch.

Before you start

  • Install git-artifact and check its requirements.
  • Run the commands from the root of your application repository.
  • These steps create a new local artifacts branch. If you already have one, follow Clone and sync.
  • The publish command assumes a Git remote named origin is configured.

Initialize and create

# Create the orphan artifacts branch
git artifact init

# Create metadata and an empty local directory
git artifact new auth-redesign -d "Auth redesign notes"

# Add files (.artifact.json is managed by the tool, outside the workspace)
printf '%s\n' '# Auth redesign' > .artifacts/auth-redesign/design.md

# Save files and publish for the first time
git artifact save auth-redesign
git push origin artifacts

init creates an orphan artifacts branch without switching HEAD. new creates the Artifact; save updates an existing one.

Later publishes

Rebase onto the remote tip before pushing updates that may race with others:

git artifact save auth-redesign
git fetch origin
git switch artifacts
git rebase origin/artifacts
git push origin artifacts
git switch -