# Reuse Worktree

> Reset this worktree to latest main and create a new branch for fresh work.

- Skill: `rogeriochaves/reuse-worktree` (Agent Skill)
- Install (CLI): `npx skillmds@latest add rogeriochaves/reuse-worktree`
- Raw SKILL.md: https://api.skillmd.com/api/skills/rogeriochaves/reuse-worktree/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: rogeriochaves (https://skillmd.com/u/rogeriochaves)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/rogeriochaves/reuse-worktree

---


Reset this worktree to latest main and create a new branch for fresh work.

Steps:
1. `git fetch origin main`
2. `git reset --hard origin/main`
3. Create a new branch: `git checkout -b $ARGUMENTS`

If no branch name is provided, ask the user what to name the branch.

