docs guides Getting Started
01-getting-started.md GuidesJul 17, 2026

Getting Started

GitStack keeps fast-moving work split into small, ordered reviews on a single branch. This guide takes you from a fresh install to your first landed stack.

Install the CLI#

Install gs with the one-line installer:

bash
curl -fsSL https://gitstack.sh/install.sh | sh

The installer puts gs in ~/.local/bin by default, so no sudo is needed, and it asks before touching your PATH. Run it from a terminal and it prompts for the install location; in CI it uses the defaults silently. Set GITSTACK_INSTALL_DIR to pick another directory, such as /usr/local/bin.

Or grab it from Homebrew:

bash
brew install alethi-dev/tap/gs

Verify the install:

bash
gs --version

Install the agent skill#

If a coding agent writes some of your code, give it the gs skill before it touches a GitStack repo:

bash
gs skill install ~/.claude/skills/

The skill teaches the agent the same workflow this guide teaches you: commit through gs, carve commits into reviews, respond to threads, and land the stack. Without it, agents fall back on the raw git writes they learned everywhere else, and those bypass the stack tracking. The path above is where Claude Code looks for skills. Pass a different directory for another agent, or run the command with no path to print the skill to stdout and wire it up yourself.

You only install it once. When you upgrade gs, it updates the installed skill on its next run and prints one line saying so. It leaves a copy you have edited alone and reminds you instead. An older gs never replaces a skill written by a newer one, and a gs you built from source never updates it on its own. To get only the reminder, add this to ~/.config/gs/config.toml:

toml
[skill]
auto_refresh = false

Sign in#

gs login opens a browser handshake against gitstack.sh and stores a session token locally:

bash
gs login
gs whoami

If you work as more than one identity on the same machine, say a personal account and a work account, sign each one into its own named profile:

bash
gs login --profile work
gs auth list
gs auth use work --repo   # this repo always acts as "work"

gs auth list shows every profile and which one answers in the current repo. Configuration & files covers how profiles are stored and how gs picks one per command.

Clone a repo or bring your own#

Clone an existing repo from the server:

bash
gs clone acme/payments

Or turn a directory you already have into a GitStack repo:

bash
gs init --repo payments

Or import a repository you already host on GitHub.

Install the GitHub App before you import

The import only works once the GitStack GitHub App is installed on the source repository. While signed in, open gitstack.sh/github/install/start, pick the GitHub account or org that owns the repo, and grant the app access to it. If you run the import without it, the command fails and prints this same install link.

bash
gs repo import github acme/payments

The import creates a linked repo on GitStack and prints its clone URL. GitStack becomes the system of record; the GitHub copy stays connected as a mirror, so issues, comments, and CI checks flow both ways.

Make your first stack#

A branch holds a stack of reviews; each review is a contiguous slice of commits. Work in small commits, then carve them into reviews:

bash
gs switch -c add-billing

gs add internal/billing/model.go
gs commit -m "billing: subscription model"

gs add internal/api/billing.go
gs commit -m "billing: POST /api/billing"

gs stack --commits

Carve the commits into reviews bottom-up. The create that reaches the branch tip pushes the branch and manifest for you:

bash
gs review create c1 -t "billing: subscription model"
gs review create -t "billing: POST /api/billing endpoint"
One-step carve

For a single-commit review at the top of the stack, gs commit -m "..." --review -t "title" commits, carves, and pushes in one move.

Check the result. The stack should read like a story:

bash
gs stack

Respond to review feedback#

Comments live on reviews. Read the unresolved threads, fix, and push:

bash
gs review comments r1 --unresolved

gs add internal/billing/model.go
gs amend --no-edit --resolves 01H8
gs push

Editing a mid-stack review is safe because gs amend rewrites that review's commit and rebases everything above it for you.

Land it#

Reviews land bottom-up. Land one at a time or the whole stack:

bash
gs submit r1
gs submit --stack

When every review on the branch has landed, clean up:

bash
gs cleanup

Where to go next#

Command What it does
gs stack show the stack top-to-bottom with review state
gs status working tree plus where HEAD sits in the stack
gs review list your open reviews across branches
gs ui open the local web viewer
Command
gs stack
What it does
show the stack top-to-bottom with review state
Command
gs status
What it does
working tree plus where HEAD sits in the stack
Command
gs review list
What it does
your open reviews across branches
Command
gs ui
What it does
open the local web viewer
Keyboard shortcuts on this site

Press ⌘K to search the docs, and f to toggle focus mode while reading.