Worktree Done banner
open-agreements open-agreements

Worktree Done

Git community

Description

# Close Out a Git Worktree Safely Wrap up work in a worktree: commit, push, open a PR, then cleanly remove the worktree. ## Instructions 1. **Check for uncommitted work:** ```bash git status ``` If there are uncommitted changes, commit them with an appropriate message. Stage specific files — don't use `git add -A`. 2. **Push the branch:** ```bash git push -u origin <branch-name> ``` 3. **Open a PR** using the `gh` CLI: ```bash gh pr create --title "<short title>"

Installation

Installs to ~/.claude/commands/open-agreements-open-agreements-worktree-done.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/open-agreements/open-agreements/HEAD/.claude/commands/worktree-done.md -o ~/.claude/commands/open-agreements-open-agreements-worktree-done.md

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

Full documentation available on GitHub

View Source Repository