Skip to content

Commit 95c03cf

Browse files
committed
docs: add screenshots
fixes #8
1 parent a8631f1 commit 95c03cf

9 files changed

Lines changed: 64 additions & 68 deletions

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ repository. jip does **not** work with Git directly.
3535

3636
```bash
3737
# Make your changes as a stack of jj commits
38-
jj commit -m "feat: add data model"
39-
jj commit -m "feat: add migration"
38+
jj commit -m "feat: add user data model"
39+
jj commit -m "feat: add user store"
40+
jj commit -m "feat: add user API endpoint"
4041

4142
# Create/update PRs for the stack
4243
jip send
@@ -45,14 +46,20 @@ jip send
4546
jj new <change-id>
4647
# ... make changes ...
4748
jj squash
48-
jip send
49+
jip s # alias for 'send'
4950

50-
# After bottom PR is merged upstream
51-
jj git fetch
52-
jj rebase -o main
53-
jip send
51+
# After bottom PR is merged upstream, rebase the rest and send again
52+
jip s --rebase
5453
```
5554

55+
A stack of commits before sending:
56+
57+
![jj log showing a stack of three commits](docs/images/jj-log-before-send.png)
58+
59+
The resulting PR on GitHub with stack navigation:
60+
61+
![GitHub PR showing stack navigation with links to all PRs in the stack](docs/images/pr-stack-navigation.png)
62+
5663
## Documentation
5764

5865
- [Why commit-based workflow?](docs/why.md) — the philosophy behind jip

docs/images/independent-pr.png

60.6 KB
Loading

docs/images/interdiff-comment.png

82.7 KB
Loading

docs/images/jj-log-before-send.png

76.9 KB
Loading

docs/images/multi-stack-jj-log.png

101 KB
Loading
81 KB
Loading
41.2 KB
Loading

docs/reviewing.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ created by jip. You don't need jip or jj installed to review them.
55

66
## What a stacked PR looks like
77

8-
Each PR in a stack has a description like:
8+
Each PR in a stack has a description listing all PRs with the current one
9+
highlighted:
910

10-
> **Stack:**
11-
> - PR #3: Add API endpoint **← you are here**
12-
> - PR #2: Add database migration
13-
> - PR #1: Add data model
11+
![GitHub PR showing stack navigation with links to all PRs in the stack](images/pr-stack-navigation.png)
1412

15-
The PR diff shows only the changes in *that specific commit*, not the
16-
cumulative diff of the whole stack.
13+
The PR description tells you which commit to review. The 'Files changed' tab
14+
shows the cumulative diff from `main`, but you should **only** look at the
15+
highlighted commit (5670b0e in the screenshot above).
1716

1817
## How to review
1918

@@ -42,14 +41,15 @@ reviewable change.
4241

4342
## When you want something changed
4443

45-
Say you're reviewing a 4-PR stack and you request changes on PR #2:
44+
Say you're reviewing the 3-PR stack from the screenshot above and you request
45+
changes on PR #2 (the user store):
4646

4747
1. The author fixes the commit for PR #2 and runs `jip send`.
4848
2. jip **posts a comment** on PR #2 showing exactly what changed since your
4949
last review (rebase noise is filtered out). You don't need to re-read the
5050
full diff — just read that comment.
51-
3. PRs #3 and #4 are rebased but their actual content didn't change, so their
52-
diffs stay the same.
51+
3. PR #3 is rebased but its actual content didn't change, so its diff stays
52+
the same.
5353
4. PR #1 is unaffected.
5454

5555
### What are these diff comments?
@@ -59,6 +59,12 @@ old and new version of the commit. Rebase changes are factored out, so you see
5959
only what the author actually changed in response to your review. (This is
6060
sometimes called an "interdiff" — a diff between two diffs.)
6161

62+
![Interdiff comment showing exactly what changed since the last push](images/interdiff-comment.png)
63+
64+
If a PR was only rebased without any actual content changes, jip notes that:
65+
66+
![Comment indicating the PR was only rebased with no content changes](images/rebase-only-comment.png)
67+
6268
## Merging
6369

6470
PRs created by jip are **normal GitHub PRs**. There is no special "land"

docs/workflows.md

Lines changed: 34 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -49,94 +49,71 @@ jip s --upstream upstream
4949

5050
---
5151

52-
## Multi-stack workflow: reformat, bugfix, feature, and docs
52+
## Multi-stack workflow: user feature and docs
5353

54-
You need to make four changes to a project. Three are related (reformat
55-
bugfixfeature), one is unrelated (docs). You decide to split them into two
56-
stacks.
54+
You need to make four changes to a project. Three are related (data model
55+
storeAPI endpoint), one is unrelated (docs). You decide to split them into
56+
two stacks.
5757

5858
### Setting up the stacks
5959

6060
```bash
61-
# Stack 1: reformat → bugfixfeature
61+
# Stack 1: data model → storeAPI endpoint
6262
jj new main
63-
# ... run gofumpt, verify ...
64-
jj commit -m "style: reformat all Go files with gofumpt"
63+
# ... create user type ...
64+
jj commit -m "feat: add user data model"
6565

66-
# ... fix the bug ...
67-
jj commit -m "fix: correct off-by-one in pagination"
66+
# ... create store ...
67+
jj commit -m "feat: add user store"
6868

69-
# ... implement feature ...
70-
jj commit -m "feat: add cursor-based pagination"
69+
# ... create handler ...
70+
jj commit -m "feat: add user API endpoint"
7171

7272
# Stack 2: unrelated docs change (branching from main, not from the stack above)
7373
jj new main
7474
# ... update docs ...
75-
jj commit -m "docs: update API examples for v2"
75+
jj commit -m "docs: update README with getting started section"
7676
```
7777

78-
Your jj log now looks like:
78+
Your jj log now shows two independent stacks branching from main:
7979

80-
```
81-
@ yyozkxuu alice@example.com 2026-02-26 21:18:04 beb5c864
82-
│ (empty) (no description set)
83-
○ vuzkwnuw alice@example.com 2026-02-26 21:18:04 9df5376f
84-
│ docs: update API examples for v2
85-
│ ○ prmxnnou alice@example.com 2026-02-26 21:18:04 06d70097
86-
│ │ feat: add cursor-based pagination
87-
│ ○ plxqtqrq alice@example.com 2026-02-26 21:18:04 5ec21ca9
88-
│ │ fix: correct off-by-one in pagination
89-
│ ○ tolsvlnw alice@example.com 2026-02-26 21:18:04 0268aba3
90-
├─╯ style: reformat all Go files with gofumpt
91-
○ tznkmxxk alice@example.com 2026-02-26 21:17:54 main 62073074
92-
│ initial commit
93-
◆ zzzzzzzz root() 00000000
94-
```
80+
![jj log showing two independent stacks branching from main](images/multi-stack-jj-log.png)
9581

9682
### Sending both stacks
9783

9884
```bash
9985
# Send both stacks at once (tips of each stack, jip resolves ancestors)
100-
jip s prm vu
86+
jip s qnv ppx
10187
```
10288

10389
jip creates 4 PRs total: 3 for stack 1 (each building on the previous), 1 for
10490
the docs change.
10591

10692
### Review feedback comes in
10793

108-
The reviewer approves the reformat PR and merges it. They request changes to
109-
the bugfix and want a small tweak to the feature.
94+
The reviewer requests changes to the user store (PR #2) — they want a `List`
95+
method added.
11096

11197
```bash
112-
# Fix the bugfix commit
113-
jj new plx
114-
# ... make changes ...
115-
jj squash
116-
117-
# Fix the feature commit
118-
jj new prm
119-
# ... make changes ...
98+
# Fix the user store commit
99+
jj new pkn
100+
# ... add List method ...
120101
jj squash
121102

122-
# Fetch the merged reformat PR and rebase
123-
jj git fetch
124-
jj rebase -o main
125-
126103
# Update all PRs (jip posts comments showing what changed)
127-
jip s prm vu
104+
jip s qnv ppx
128105

129106
# Or combine rebase + send in one step
130-
jip s --rebase prm vu
107+
jip s --rebase qnv ppx
131108
```
132109

133-
The reformat PR is already merged, so jip skips it. The bugfix PR now targets
134-
`main` directly (since its parent was merged). The feature PR is rebased on
135-
top. Reviewers see comments showing exactly what changed.
110+
The user store PR (#2) gets a comment showing the added `List` method. The API
111+
endpoint PR (#3) is rebased but its content didn't change. The data model PR
112+
(#1) is unaffected. Reviewers see comments showing exactly what changed.
136113

137114
### Continuing the cycle
138115

139-
The reviewer approves and merges the bugfix PR:
116+
The reviewer approves and merges the data model PR (#1):
140117

141118
```bash
142119
jj git fetch
@@ -148,8 +125,8 @@ jip s -x main::
148125
jip s -x --rebase main::
149126
```
150127

151-
Now only the feature PR remains, targeting `main` directly. The stack
152-
shortened itself one PR at a time.
128+
Now the user store PR targets `main` directly. The stack shortened itself one
129+
PR at a time.
153130

154131
Meanwhile the docs PR was reviewed and merged independently — it was never
155132
part of the same stack.
@@ -193,6 +170,10 @@ jj squash
193170
jip s
194171
```
195172

173+
jip posts a comment on the updated PR showing exactly what changed:
174+
175+
![Interdiff comment showing exactly what changed since the last push](images/interdiff-comment.png)
176+
196177
### How do I add a new commit to an existing stack?
197178

198179
Use `jj new` to insert a commit at the right position:
@@ -226,3 +207,5 @@ on GitHub. The remaining commit's PR is updated normally.
226207

227208
Yes. If your revset resolves to a single commit, jip creates a single PR with
228209
no stack navigation in the description.
210+
211+
![A single-commit PR with no stack navigation](images/independent-pr.png)

0 commit comments

Comments
 (0)