gt create¶
Create a new branch on top of the current branch.
Usage¶
Arguments¶
| Argument | Description |
|---|---|
<name> |
Name for the new branch |
Options¶
| Option | Description |
|---|---|
--from-trunk |
Create from trunk instead of current branch |
-t, --template <name> |
Use a template to create multiple branches |
--list-templates |
List available templates |
Examples¶
Basic Usage¶
Create a new branch on top of the current branch:
Create from Trunk¶
Create a branch directly from main/master:
Using Templates¶
List available templates:
Create from a template:
This creates a stack of branches based on the template pattern.
Behavior¶
- Ensures working directory is clean
- Creates a new Git branch from current HEAD
- Tracks the branch in Stack's metadata
- Switches to the new branch