> ## Documentation Index
> Fetch the complete documentation index at: https://graphite-58cc94ce.mintlify.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Get started using the Graphite VS Code extension to stack pull requests.

## Understand elements of the VS Code extension

<Frame>
  <img src="https://mintcdn.com/graphite-58cc94ce/v5snjlX4njZhFyeg/images/8de2a4f7-1702403419-frame-10123329.png?fit=max&auto=format&n=v5snjlX4njZhFyeg&q=85&s=8bb463c49b6da47dd8861c5e87bab72c" width="1350" height="1246" data-path="images/8de2a4f7-1702403419-frame-10123329.png" />
</Frame>

## Walkthrough video

<Frame>
  <iframe width="750" height="360" src="https://www.youtube.com/embed/TCFa0Sf_5X8?si=uLxzTYILcwrg27rW" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />
</Frame>

## Check out a branch

There are two ways to check out branch in the VS Code extension:

1. Double-click the branch on the stack view

2. Focus a branch (single-click a branch such that it has a blue outline) and click "check out" in the branch info panel

A checked out branch will be indicated by a blue background/a pointer on the left side of the stack view.

## Focus a branch

Focusing a branch allows you to see what's been changed in the branch without checking it out. To focus a branch, single-click the branch in the visualization such that it has a blue outline. Focusing a branch adjusts the branch info panel so that it shows the files touched by that branch.

<Frame>
  <img src="https://mintcdn.com/graphite-58cc94ce/vY1t0Vsr-LRJgMIn/images/36c613bb-1702403792-video-to-gif-converter.gif?s=396f57854367d789c378154c9f0f0e20" width="600" height="788" data-path="images/36c613bb-1702403792-video-to-gif-converter.gif" />
</Frame>

## View uncommitted changes

Uncommitted changes are represented by a node labeled "uncommitted changes" on the stack view. To see your uncommitted changes in the extension, focus the "uncommitted changes" node as you would any other branch. The branch info panel will adjust to a staging environment with your local changes.

<Frame>
  <img src="https://mintcdn.com/graphite-58cc94ce/vY1t0Vsr-LRJgMIn/images/355db816-1702403994-frame-10123330.png?fit=max&auto=format&n=vY1t0Vsr-LRJgMIn&q=85&s=15b28ed2c4d12c6063d06e3f8bf35648" width="1350" height="928" data-path="images/355db816-1702403994-frame-10123330.png" />
</Frame>

## Staging and unstaging files

Toggling the checkbox near each file in the uncommitted changes panel will stage or unstage that file independently. Hovering over the file will give you the option to view the diff, or delete those changes.

There are additional options to "stage all," "unstage all," and "delete all changes."

## Creating a new branch/modifying a branch

After staging relevant changes, you can **create a new branch** by entering a commit message and clicking "create new branch."

To modify an existing branch, ensure you have the desired branch checked out, stage relevant changes, check the "modify \<branch-name>" checkbox, and click "commit to the current branch."

<Frame>
  <img src="https://mintcdn.com/graphite-58cc94ce/v5snjlX4njZhFyeg/images/91b2ce0b-1702404673-frame-10123331.png?fit=max&auto=format&n=v5snjlX4njZhFyeg&q=85&s=37c450a94784890d17a1a0f8b6e9ed9a" width="1350" height="1174" data-path="images/91b2ce0b-1702404673-frame-10123331.png" />
</Frame>

### Setting default modify behavior

When modifying a branch, you can either create a new commit on that branch, or modify the previous commit on that branch. You can set your preferred behavior in the extension's settings:

<Frame>
  <img src="https://mintcdn.com/graphite-58cc94ce/v5snjlX4njZhFyeg/images/ac32c075-1702404784-frame-10123332.png?fit=max&auto=format&n=v5snjlX4njZhFyeg&q=85&s=266b97279b92107f0bee04913381268f" width="1224" height="528" data-path="images/ac32c075-1702404784-frame-10123332.png" />
</Frame>

Note that if your preferred modify behavior is commit, you'll be prompted to enter a commit message before creating the commit. If the default behavior is amend, you won't be prompted to do so.

## Drag to move/rebase branches

You can re-arrange branches by dragging them onto a new parent.

<Frame>
  <img src="https://mintcdn.com/graphite-58cc94ce/vY1t0Vsr-LRJgMIn/images/19c44dee-1702413095-video-to-gif-converter-1.gif?s=08c83cf86f1421e4ae302889fec68bf0" width="600" height="810" data-path="images/19c44dee-1702413095-video-to-gif-converter-1.gif" />
</Frame>

## Tracking and getting branches

You can track branches onto a parent by clicking the "cloud" icon in the upper right hand corner of the extension. This is equivalent to the CLI's `gt track` and `gt get` commands.

<Frame>
  <img src="https://mintcdn.com/graphite-58cc94ce/v5snjlX4njZhFyeg/images/e85d5acb-1705600738-frame-10123333.png?fit=max&auto=format&n=v5snjlX4njZhFyeg&q=85&s=706d8c45ef70af72ddb957f71da5185f" width="1350" height="1246" data-path="images/e85d5acb-1705600738-frame-10123333.png" />
</Frame>
