Creating a stack
The below snippet shows two equivalent ways to create a branch with a single commit on it using
gt branch create.
gt branch checkout main
# * build feature part 1 *
# create a new branch off of main with your changes and add a commit
gt add -A # add all unstaged change (same syntax as git add)
gt branch create -m "part 1" # -> creates a commit with message "part 1" on a branch named "05-04-part_1" (inferred from the date and your commit message)
# alternatively, you can combine the last 2 commands into a single line:
gt branch create -a -m "part 1"
Once you have created a branch with your first set of changes, you can continue to build your stack by issuing more
gt branch createcommands as you work!
# * build feature part 2 *
# create a new branch on your stack
gt branch create -a -m "part 2"
# * build feature part 3 *
# create another new branch on your stack
gt branch create -a -m "part 3"
Now that you've created a stack, you can use Graphite's CLI to easily visualize it in your terminal.