Skip to content
Back to skills

Using Git Worktrees

ASecurity

Use before non-trivial work on a default branch to isolate changes in a feature branch or dedicated git worktree.

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 9, 2026
ai-agentsbashgit

Security analysis

A100/100

Scanned June 9, 2026

npx -y skills add DYAI2025/Plumbline --skill using-git-worktrees --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Using Git Worktrees?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Using Git Worktrees
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dyai2025-using-git-worktrees/badge)](https://www.skillsdirectory.com/skills/dyai2025-using-git-worktrees)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: using-git-worktrees
description: Use before non-trivial work on a default branch to isolate changes in a feature branch or dedicated git worktree.
---

# Using Git Worktrees

## Safe branch isolation
1. Check `git status --short` and current branch.
2. If on `main` or `master`, create a feature branch or worktree before edits.
3. Never discard uncommitted user changes.
4. Keep commits atomic and named after the task or requirement.

Common commands:
```bash
git switch -c feature/<slug>
# or
git worktree add ../<repo>-<slug> -b feature/<slug>
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…