Skip to content

Commit 2a8af27

Browse files
author
elvis kahoro
authored
Merge pull request #140 from warpdotdev/elvis/graphite-cheatsheat
feat: Graphite: Adding some of the core Grpahite workflows from the Graphite cheatsheet website: https://graphite.dev/docs/command-reference
2 parents 3657187 + 4ba9a29 commit 2a8af27

17 files changed

Lines changed: 194 additions & 0 deletions
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Graphite - Checkout a branch
3+
command: "gt bco {{branch_name}}"
4+
tags:
5+
- graphite
6+
description: "Switch to or checkout a branch. Similar to `git checkout <branch_name>`"
7+
arguments:
8+
- name: branch_name
9+
description: The name of the branch that you want to checkout
10+
default_value: main
11+
source_url: "https://graphite.dev/docs/graphite-cheatsheet"
12+
author: graphite
13+
author_url: "https://graphite.dev/"
14+
shells: []
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Graphite - Create a new branch stacked on top of the current branch and commit staged changes
3+
command: "gt branch create"
4+
tags:
5+
- graphite
6+
description: "Alias: `bc`. Create a new branch stacked on top of the current branch and commit staged changes. If no branch name is specified but a commit message is passed, generate a branch name from the commit message."
7+
source_url: "https://graphite.dev/docs/graphite-cheatsheet"
8+
author: graphite
9+
author_url: "https://graphite.dev/"
10+
shells: []
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Graphite - Delete branch
3+
command: "gt branch delete"
4+
tags:
5+
- graphite
6+
description: "Alias: `bdl`. Delete a branch and its corresponding Graphite metadata."
7+
source_url: "https://graphite.dev/docs/graphite-cheatsheet"
8+
author: graphite
9+
author_url: "https://graphite.dev/"
10+
shells: []

specs/graphite/gt_branch_down.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Graphite - Move down the stack of branches
3+
command: "gt branch down {{step}}"
4+
tags:
5+
- graphite
6+
description: "Quickly move down a stack of branches. By default, takes a step argument of 1, but can add a step value (ex. gt branch up 2) to skip a certain number of branches."
7+
arguments:
8+
- name: step
9+
description: The number of branches to pass when traversing the stack of branches.
10+
default_value: 1
11+
source_url: "https://graphite.dev/docs/graphite-cheatsheet"
12+
author: graphite
13+
author_url: "https://graphite.dev/"
14+
shells: []

specs/graphite/gt_branch_edit.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Graphite - Run an interactive branch rebase
3+
command: "gt branch edit"
4+
tags:
5+
- graphite
6+
description: "Alias: `be`. Run an interactive rebase on the current branch's commits and restack upstack branches."
7+
source_url: "https://graphite.dev/docs/graphite-cheatsheet"
8+
author: graphite
9+
author_url: "https://graphite.dev/"
10+
shells: []

specs/graphite/gt_branch_fold.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Graphite - Fold a branch's changes into its parent
3+
command: "gt branch fold"
4+
tags:
5+
- graphite
6+
description: "Alias: `bf`. Fold a branch's changes into its parent, update dependencies of descendants of the new combined branch, and restack."
7+
source_url: "https://graphite.dev/docs/graphite-cheatsheet"
8+
author: graphite
9+
author_url: "https://graphite.dev/"
10+
shells: []

specs/graphite/gt_branch_list.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Graphite - Log or show the stacked branch tree
3+
command: "gt ls"
4+
tags:
5+
- graphite
6+
description: "Log all stacks tracked by Graphite, arranged to show dependencies. Similar to showing the commit log."
7+
source_url: "https://graphite.dev/docs/graphite-cheatsheet"
8+
author: graphite
9+
author_url: "https://graphite.dev/"
10+
shells: []
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Graphite - Create a branch with an accompanying commit message
3+
command: "gt bc -am {{commit_message}}"
4+
tags:
5+
- graphite
6+
description: "Create a new branch stacked on top of the current branch and commit staged changes. If no branch name is specified but a commit message is passed, generate a branch name from the commit message."
7+
arguments:
8+
- name: commit_message
9+
description: The message to assign to this commit.
10+
default_value: ~
11+
source_url: "https://graphite.dev/docs/graphite-cheatsheet"
12+
author: graphite
13+
author_url: "https://graphite.dev/"
14+
shells: []
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Graphite - Rename a branch
3+
command: "gt branch rename"
4+
tags:
5+
- graphite
6+
description: "Alias: `brn`. Rename a branch and update metadata referencing it. Note that this removes any associated GitHub pull request."
7+
source_url: "https://graphite.dev/docs/graphite-cheatsheet"
8+
author: graphite
9+
author_url: "https://graphite.dev/"
10+
shells: []
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Graphite - Restacks the current branch to its parent
3+
command: "gt branch restack"
4+
tags:
5+
- graphite
6+
description: "Alias: `brn`. Ensure the current branch is based on its parent, rebasing if necessary."
7+
source_url: "https://graphite.dev/docs/graphite-cheatsheet"
8+
author: graphite
9+
author_url: "https://graphite.dev/"
10+
shells: []

0 commit comments

Comments
 (0)