Skip to content

Commit 9d14b8f

Browse files
germangarcessteveklabnik
authored andcommitted
Update simultaneous-edits.md
1 parent ddf53b5 commit 9d14b8f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/advanced/simultaneous-edits.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,19 @@ Whew! What a change! Five parents. Let's create an extra one so we can use our
158158
squash-style workflow more easily: we temporarily work on a `@` change, and then
159159
`jj squash` diffs back into whichever parent makes the most sense.
160160

161+
> **Tip: `jj absorb` — redistribute edits back into the right branches.**
162+
> When your working copy (`@`) contains edits that belong to multiple PRs, `jj absorb` will push those edits into the nearest mutable ancestors instead of you manually splitting and rebase-ing.
163+
> Example:
164+
>
165+
> ```sh
166+
> jj absorb # absorb from @ into appropriate mutable parents
167+
> jj absorb src/ # limit to a file tree
168+
> jj absorb -f @ -t mutable() # explicit source/target
169+
> jj op show -p # inspect the planned moves
170+
> ```
171+
>
172+
> Use it after developing across several branches in one working copy — it saves the cut-and-paste + rebase chore by automatically redistributing changes where they belong.
173+
161174
```console
162175
> jj new
163176
Working copy now at: nllzosqm 85324040 (empty) (no description set)

0 commit comments

Comments
 (0)