Learn how to navigate stacked branches with the Graphite CLI.
gt
in a repo of your choice
gt log
gt log
to view the current state of your repository:
git
branches under the hood—you can check them out with native git
, but the easiest way is to use gt checkout
:
gt checkout
(or gt co
) in interactive mode:
gt log short
you’re on part_1
as intended:
gt up
, gt down
, gt top
, and gt bottom
commands help make this possible.
Since gt bottom
takes you to the bottom-most branch in your stack not including your trunk branch, you can use gt checkout --trunk/-t
, which always takes you to your trunk
branch (e.g. main
):
gt up
and gt top
will ask which child branch you’d like to checkout if there’s ever ambiguity.