## Documentation Index

Fetch the complete documentation index at: [/docs/llms.txt](/content/docs/llms.txt)

Use this file to discover all available pages before exploring further.

Common tasks and their commands. Click any command to see full documentation in the [command reference](/content/docs/command-reference/index.html).

Graphite fully supports multiple Git worktrees. Starting in `gt` version `1.8.4`, Graphite does not modify branches checked out in another worktree in most cases. See [Work in multiple Git worktrees](/content/docs/multiple-worktrees/index.html) for details.

## Viewing your stack

| Task | Command | Short Form |
| --- | --- | --- |
| See full information about your branches, PRs, and worktree locations | [`gt log`](/content/docs/command-reference#gt-log-%5Bcommand%5D/index.html) |  |
| See all of your branches | [`gt log short`](/content/docs/command-reference#gt-log-%5Bcommand%5D/index.html) | `gt ls` |

## Creating and modifying branches

| Task | Command | Short Form |
| --- | --- | --- |
| Create a new branch | [`gt create`](/content/docs/command-reference#gt-create-%5Bname%5D/index.html) | `gt c` |
| Create a branch on top of a branch checked out in another worktree | [`gt create --onto <branch>`](/content/docs/command-reference#gt-create-%5Bname%5D/index.html) |  |
| Create a branch, stage all, commit with message | [`gt create --all --message "message"`](/content/docs/command-reference#gt-create-%5Bname%5D/index.html) | `gt c -am "message"` |
| Amend staged changes to current branch | [`gt modify`](/content/docs/command-reference#gt-modify/index.html) | `gt m` |
| Stage all changes and amend them to current branch | [`gt modify --all`](/content/docs/command-reference#gt-modify/index.html) | `gt m -a` |
| Add a new commit to current branch | [`gt modify --commit`](/content/docs/command-reference#gt-modify/index.html) | `gt m -c` |
| Stage all changes and add a new commit to current branch with message | [`gt modify --commit --all --message "message"`](/content/docs/command-reference#gt-modify/index.html) | `gt m -cam "message"` |
| Amend staged changes to a downstack branch | [`gt modify --into`](/content/docs/command-reference#gt-modify/index.html) | `gt m --into` |

## Syncing and submitting

| Task | Command | Short Form |
| --- | --- | --- |
| Pull trunk, clean up merged branches, restack | [`gt sync`](/content/docs/command-reference#gt-sync/index.html) |  |
| Push current branch and all downstack branches to remote and create/update PRs | [`gt submit`](/content/docs/command-reference#gt-submit/index.html) |  |
| Push all branches in current stack to remote and create/update PRs | [`gt submit --stack`](/content/docs/command-reference#gt-submit/index.html) | `gt ss` |
| Only push branches and update PRs for branches that already have PRs open | [`gt submit --stack --update-only`](/content/docs/command-reference#gt-submit/index.html) | `gt ss -u` |

## Navigating your stack

| Task | Command | Short Form |
| --- | --- | --- |
| Switch to a specific branch | [`gt checkout`](/content/docs/command-reference#gt-checkout-%5Bbranch%5D/index.html) | `gt co` |
| Move up one branch | [`gt up`](/content/docs/command-reference#gt-up-%5Bsteps%5D/index.html) | `gt u` |
| Move down one branch | [`gt down`](/content/docs/command-reference#gt-down-%5Bsteps%5D/index.html) | `gt d` |
| Move up/down multiple branches | [`gt up 3`](/content/docs/command-reference#gt-up-%5Bsteps%5D/index.html), [`gt down 2`](/content/docs/command-reference#gt-down-%5Bsteps%5D/index.html) | `gt u 3`, `gt d 2` |
| Go to the top of the stack | [`gt top`](/content/docs/command-reference#gt-top/index.html) | `gt t` |
| Go to the bottom of the stack | [`gt bottom`](/content/docs/command-reference#gt-bottom/index.html) | `gt b` |

## Reorganizing your stack

| Task | Command | Short Form |
| --- | --- | --- |
| Move branch to a new parent | [`gt move`](/content/docs/command-reference#gt-move/index.html) |  |
| Fold branch into its parent | [`gt fold`](/content/docs/command-reference#gt-fold/index.html) |  |
| Delete branch but keep changes in working tree | [`gt pop`](/content/docs/command-reference#gt-pop/index.html) |  |
| Reorder branches in your stack | [`gt reorder`](/content/docs/command-reference#gt-reorder/index.html) |  |
| Split branch into multiple branches | [`gt split`](/content/docs/command-reference#gt-split/index.html) | `gt sp` |
| Squash all commits in branch into one | [`gt squash`](/content/docs/command-reference#gt-squash/index.html) | `gt sq` |
| Distribute staged changes to downstack branches by amending relevant commits | [`gt absorb`](/content/docs/command-reference#gt-absorb/index.html) | `gt ab` |

## Recovery

| Task | Command | Short Form |
| --- | --- | --- |
| Undo the most recent Graphite mutation | [`gt undo`](/content/docs/command-reference#gt-undo/index.html) |  |

## Tracking branches

| Task | Command | Short Form |
| --- | --- | --- |
| Start tracking an existing Git branch with Graphite | [`gt track`](/content/docs/command-reference#gt-track-%5Bbranch%5D/index.html) | `gt tr` |
| Stop tracking a branch | [`gt untrack`](/content/docs/command-reference#gt-untrack-%5Bbranch%5D/index.html) | `gt utr` |

## Collaborating

| Task | Command | Short Form |
| --- | --- | --- |
| Fetch a teammate’s stack locally | [`gt get`](/content/docs/command-reference#gt-get-%5Bbranch%5D/index.html) |  |
| Freeze a branch to prevent accidental edits | [`gt freeze`](/content/docs/command-reference#gt-freeze-%5Bbranch%5D/index.html) |  |
| Unfreeze a branch | [`gt unfreeze`](/content/docs/command-reference#gt-unfreeze/index.html) |  |
