git-workflow

Manage trunk-based Git workflows using worktrees and conventional commits.

16|3|Updated May 5, 2026
One-click install
npx skills add https://github.com/Kevin-Liu-01/Agent-Machines --skill git-workflow-kevin-liu-01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-workflow
Source: https://github.com/Kevin-Liu-01/Agent-Machines/tree/main/knowledge/skills/git-workflow
Command: npx skills add https://github.com/Kevin-Liu-01/Agent-Machines --skill git-workflow-kevin-liu-01

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Engineers often contend with fragile Git switch/checkout workflows that can discard work, create merge conflicts, and complicate collaboration. This Skill prescribes a trunk-based workflow using git worktrees, safer alternatives to checkout, and clear commit messaging to streamline collaboration.

Core Features & Use Cases

  • Trunk-based development with coordinated worktrees to run multiple features off a single history without noisy merges.
  • Safer branch and file operations using git switch and git restore to prevent accidental data loss.
  • Enforced Conventional Commits style and guarded pushes with --force-with-lease to protect shared branches.

Quick Start

Initialize a trunk-based workflow with git worktrees and conventional commits, then create a feature branch from dev and push with force-with-lease when needed.

Frequently Asked Questions about git-workflow

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

FAQPage Schema
How do I manage trunk-based development with git worktrees for parallel features?

Git worktrees enable trunk-based development by allowing you to run multiple features off a single history without noisy merges. You can create separate working directories for each feature branch, streamlining parallel development.

What is the safest way to switch branches and restore files in git?

Using git switch and git restore is safer than standard checkout because they separate branch switching from file manipulation. This prevents accidental data loss and avoids discarding uncommitted work.

How do I push to a shared branch without overwriting team commits?

Use git push --force-with-lease to guard your pushes to shared branches. This verifies the remote branch hasn't been updated by someone else before overwriting, preventing accidental loss of your team's commits.

How do conventional commits improve code review in a team workflow?

Conventional commits enforce a clear commit messaging style that standardizes feature development and code review history. This structured messaging streamlines collaboration by making branch maintenance and rebasing easier to track.

Can I use git worktrees to avoid merge conflicts during feature rebasing?

Yes, git worktrees allow you to isolate feature rebasing into separate directories linked to a single history. This avoids noisy merges and reduces merge conflicts when maintaining branches in a trunk-based model.

Why does trunk-based development require coordinated worktrees?

Trunk-based development requires coordinated worktrees because they enable parallel feature development off a single history without creating noisy merges. This approach reduces destructive branch operations and improves team collaboration.