Skip to content

gt checkout

Switch to a specific branch.

Usage

gt checkout <branch>

Arguments

Argument Description
<branch> Name of branch to checkout

Examples

Checkout by Name

gt checkout feature/login

Checkout Trunk

gt checkout main

Behavior

Checks out the specified branch. Works with both tracked and untracked branches.

Fuzzy Matching

Stack supports partial branch names:

gt checkout login
# Matches: feature/login, fix/login-bug, etc.

If multiple branches match, you'll be prompted to select one.