DEV Community

Cover image for Learn Claude Code: /branch
Eduardo Aguilera
Eduardo Aguilera

Posted on • Originally published at aguilera.ee

Learn Claude Code: /branch

/branch forks the conversation

Description

Forks the conversation at the current point so you can explore an alternative path without losing the original. Switches you into the fork; the original is recoverable with /resume. Alias: /fork.

Use case

Claude proposed a clean refactor, but you want to see what happens if you ask it to take a totally different angle, without throwing away the conversation that produced the clean one.

Example

> the OOP refactor looks good, let's keep it

> /branch

  ⎇ Branched conversation.
    The original is preserved — return any time with /resume.

> now try the opposite: rewrite the handler as a pipeline of pure functions

  ⏺ Sure — here's a functional take on the same handler…
Enter fullscreen mode Exit fullscreen mode

Top comments (0)