2022-03-30 14:45:02 +01:00
|
|
|
# gt
|
|
|
|
|
|
|
|
> Create and manage sequences of dependent code changes (stacks) for Git and GitHub.
|
2025-01-28 15:09:08 +01:00
|
|
|
> More information: <https://graphite.dev/docs/get-started>.
|
2022-03-30 14:45:02 +01:00
|
|
|
|
|
|
|
- Initialise `gt` for the repository in the current directory:
|
|
|
|
|
2025-01-28 15:09:08 +01:00
|
|
|
`gt init`
|
2022-03-30 14:45:02 +01:00
|
|
|
|
|
|
|
- Create a new branch stacked on top of the current branch and commit staged changes:
|
|
|
|
|
2025-01-28 15:09:08 +01:00
|
|
|
`gt create {{branch_name}}`
|
2022-03-30 14:45:02 +01:00
|
|
|
|
|
|
|
- Create a new commit and fix upstack branches:
|
|
|
|
|
2025-01-28 15:09:08 +01:00
|
|
|
`gt modify -cam {{commit_message}}`
|
2022-03-30 14:45:02 +01:00
|
|
|
|
|
|
|
- Force push all branches in the current stack to GitHub and create or update PRs:
|
|
|
|
|
|
|
|
`gt stack submit`
|
|
|
|
|
2025-01-28 15:09:08 +01:00
|
|
|
- Checkout different branch (prompts interactive mode when branch name is omitted):
|
|
|
|
|
|
|
|
`gt co {{branch_name}}`
|
|
|
|
|
|
|
|
- Sync stack with remote version (also deletes merged branches):
|
|
|
|
|
|
|
|
`gt sync`
|
|
|
|
|
2022-03-30 14:45:02 +01:00
|
|
|
- Log all tracked stacks:
|
|
|
|
|
|
|
|
`gt log short`
|
|
|
|
|
2024-01-30 01:55:24 -03:00
|
|
|
- Display help for a specified subcommand:
|
2022-03-30 14:45:02 +01:00
|
|
|
|
|
|
|
`gt {{subcommand}} --help`
|