Promoting a WIP commit into a real change
At some point a WIP commit becomes real.
This page assumes you already have a commit marked wip: or private: in your local stack. If you are not there yet, read WIP and private commits first.
When I write <change> below, I copy the short change id from jj log.
Rename it
First I update the message:
jj describe -r <change>
or directly:
jj describe -r <change> -m "docs: explain private commit workflow"
Move it where it belongs
If it should sit on top of main:
jj rebase -r <change> -o main
If it should become part of an existing stack:
jj rebase -r <change> -o <bookmark>
If it is a stack of WIP commits:
jj rebase -s <first-wip-change> -o <bookmark>
Inspect and push
Then I inspect it:
jj log -r main..@
jj diff -r <change>
With my alias, the first command is:
jj stack
And push it when it is ready:
jj git push -c <change>
If the promoted work is the last completed change, I usually use:
jj git push -c @-
Why this feels good
I do not need to decide up front whether an idea is real. I can give it a cheap name, keep moving, and promote it only after it proves useful.