Jj Restack banner
nandofarias nandofarias

Jj Restack

Development community

Description

Rebase the stack onto the latest develop. This is like jj-sync but without fetching first. 1. **Rebase the stack:** ```bash jj rebase -b @ -d 'trunk()' ``` 2. **Check for conflicts:** ```bash jj log -r 'trunk()..@ & conflicts()' --no-graph -T 'change_id.shortest(8) ++ " " ++ description.first_line() ++ "\n"' ``` 3. **Show the updated stack:** ```bash jj log -r 'trunk()..@' ``` If the user hasn't fetched recently, suggest running `/jj-sync` instead for the full sync

Installation

Installs to ~/.claude/commands/nandofarias-dotfiles-jj-restack.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/nandofarias/dotfiles/HEAD/.claude/commands/jj-restack.md -o ~/.claude/commands/nandofarias-dotfiles-jj-restack.md

Restart Claude Code, or start a new session, for it to be picked up.

Full documentation available on GitHub

View Source Repository