git

Enforce safe Git workflows with topic branches and worktree management.

16|1|Updated Jun 26, 2025
One-click install
npx skills add https://github.com/bendrucker/claude --skill git-bendrucker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git
Source: https://github.com/bendrucker/claude/tree/main/.claude/skills/git
Command: npx skills add https://github.com/bendrucker/claude --skill git-bendrucker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces consistent Git practices, preventing accidental pushes to main, standardizing branching, and simplifying complex worktree management for a smoother development workflow.

Core Features & Use Cases

  • Safe Branching: Prevents direct pushes to default branches, ensuring proper review processes.
  • Worktree Management: Provides clear guidelines and commands for creating, listing, and removing isolated Git worktrees.
  • Naming Conventions: Encourages descriptive, hyphenated branch names for clarity.
  • Use Case: When you need to work on multiple features or bug fixes simultaneously, this Skill helps you efficiently manage separate worktrees, keeping your main repository clean and organized.

Quick Start

Create a new topic branch and worktree

git worktree add .worktrees/fix-auth-bug -b fix-auth-bug

List all active worktrees

git worktree list

Remove a worktree after merging

git worktree remove .worktrees/fix-auth-bug

Frequently Asked Questions about git

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent accidental pushes to the main branch?

Prevent pushes to the default branch by enforcing topic-branch workflows. Create isolated branches with hyphenated names for each task, ensuring all work goes through proper review before merging to main, protecting the stability of your primary codebase.

What's the best way to work on multiple features simultaneously in Git?

Use Git worktrees to isolate multiple features or bug fixes in separate directories under .worktrees, each with its own branch. This keeps your main repository clean and lets you switch between tasks without stashing or committing incomplete work.

How do I create and manage Git worktrees?

Create a worktree with `git worktree add .worktrees/branch-name -b branch-name`, list active worktrees with `git worktree list`, and remove finished worktrees with `git worktree remove .worktrees/branch-name` after merging changes back to main.

Why use topic branches with standardized naming conventions?

Topic branches with hyphenated names clarify task boundaries and improve collaboration. Clear naming conventions make it easier for teams to track which branch addresses which issue, simplify code reviews, and reduce merge conflicts in shared repositories.

Can I use worktrees with collaborative projects requiring branch naming standards?

Yes. Worktrees work seamlessly with standardized naming requirements. Combine worktree isolation with hyphenated topic-branch names to enforce team conventions while letting developers work on multiple tasks in parallel without workflow friction.

What happens if I try to push directly to the default branch?

The workflow blocks direct pushes to the default branch, forcing you to create a topic branch instead. This safeguard ensures all changes undergo review and prevents unstable code from reaching production or breaking the main codebase.