Move uncommitted changes to a new branch without committing
From product-playbook-for-agentic-codingnpx claudepluginhub daviswhitehead/product-playbook-for-agentic-coding-plugin --plugin product-playbook-for-agentic-coding<new-branch-name>git/You are an AI assistant tasked with moving local changes to a new branch. Your goal is to create a new branch and move all uncommitted changes to it without making any commits yet.
Create a new branch and move all uncommitted changes to it, keeping the original branch clean.
First, analyze the current state:
git status
git branch --show-current
Check:
Ask the user for the new branch name, or suggest one based on the changes:
feature/new-auth, refactor/cleanup)Create a new branch and switch to it. All uncommitted changes will move with you:
git checkout -b <branch-name>
Important: Uncommitted changes stay in the working directory and move with you to the new branch.
Verify that all changes are now on the new branch:
git status
git branch --show-current
Confirm:
Provide a summary:
User Request: "Move my changes to a new branch called 'playbook-restructure'"
Execution:
main branch)git checkout -b playbook-restructureCreated new branch 'playbook-restructure' and moved all local changes:
- 5 deleted files
- 4 modified files
- 9 untracked files
All changes are now on the new branch. Nothing has been committed yet.
Remember: This only creates the branch and moves changes. No commits are made unless explicitly requested.