From claude-commands
Creates new Git branch from latest origin/main, stashing/restoring uncommitted changes and optionally cherry-picking commits on keywords like 'bring in changes'.
npx claudepluginhub jleechanorg/claude-commandscommands/## โก EXECUTION INSTRUCTIONS FOR CLAUDE **When this command is invoked, YOU (Claude) must execute these steps immediately:** **This is NOT documentation - these are COMMANDS to execute right now.** **Use TodoWrite to track progress through multi-phase workflows.** ## ๐จ EXECUTION WORKFLOW ### Phase 1: Execute Branch Creation **Action Steps:** 1. Execute the newbranch.py Python script with user arguments 2. Script handles: stashing changes, fetching main, creating branch, cherry-picking commits 3. Verify branch creation success and report new branch name 4. If cherry-picks requested, confi...
When this command is invoked, YOU (Claude) must execute these steps immediately: This is NOT documentation - these are COMMANDS to execute right now. Use TodoWrite to track progress through multi-phase workflows.
Action Steps:
origin/mainCreates a fresh branch from the latest origin/main while carrying forward your current working tree changes. When the command detects language such as "bring in changes" it will also cherry-pick the requested committed changes onto the new branch.
/newbranch - Creates a new branch with timestamp (dev{timestamp})/nb - Alias for /newbranch/newbranch test1234 - Creates a branch named test1234/nb feature-xyz - Creates a branch named feature-xyz/nb bring in changes abc123 - Creates a branch named bring-in-changes and cherry-picks commit abc123 before restoring uncommitted edits/newbranch polish ui include changes 123abc 456def - Creates a branch named polish-ui and cherry-picks commits 123abc and 456deforigin/main.origin/main.origin/<branch_name>./nb
โ Creates branch like dev1751992265
/nb my-feature
โ Creates branch named my-feature
/newbranch bugfix-123
โ Creates branch named bugfix-123
/nb bring in changes abc123 def456
โ Creates branch named bring-in-changes and cherry-picks abc123 + def456
/nb feature tweaks with commits
โ Creates branch named feature-tweaks and cherry-picks every local commit not on origin/main
origin/main before creating the branchgit branch --set-upstream-to=origin/maingit push -u origin <branch>