git-workflow-and-versioning

Structures git commits, branching, and worktree workflows for disciplined version control.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/alissonpef/copilot_agent_skills --skill git-workflow-and-versioning-alissonpef
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-workflow-and-versioning
Source: https://github.com/alissonpef/copilot_agent_skills/tree/main/.github/skills/git-workflow-and-versioning
Command: npx skills add https://github.com/alissonpef/copilot_agent_skills --skill git-workflow-and-versioning-alissonpef

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents generate code at high speed, and without disciplined version control, changes become unreviewable, hard to revert, and risky to merge. This Skill enforces structured git practices so every change is atomic, traceable, and reversible. ## Core Features & Use Cases - Atomic Commit Discipline: Enforces small, single-purpose commits with conventional message types (feat, fix, refactor, test, docs, chore) that explain the why behind each change. - Trunk-Based Branching Strategy: Guides short-lived feature branches, consistent branch naming, and git worktrees for running parallel AI agent work in isolated directories. - Pre-Commit Hygiene & Debugging: Provides checklists for staged diff review, secret scanning, tests, and linting, plus git bisect, blame, and log techniques for debugging. - Use Case: An AI agent implements a feature across multiple files. Instead of one giant commit, it commits each tested slice with a descriptive message, producing a clean history that reviewers can follow and revert if needed. ## Quick Start Use the git-workflow-and-versioning skill to commit my current changes as atomic commits with proper messages.

Frequently Asked Questions about git-workflow-and-versioning

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

FAQPage Schema
How do I write good git commit messages?▼

Use the format 'type: short description' with types like feat, fix, refactor, test, docs, or chore. Add a body explaining why the change was made, not what changed, since the diff already shows that.

How to split large git commits into smaller ones?▼

Target around 100 lines per commit and split anything over 1000 lines. Separate refactoring from feature work, keep formatting changes apart from behavior changes, and commit each tested increment independently.

What is trunk-based development vs gitflow?▼

Trunk-based development keeps main always deployable with short-lived feature branches merged within 1-3 days. Gitflow uses long-lived branches that accumulate merge risk; DORA research links trunk-based development to high-performing teams.

How do git worktrees help with parallel development?▼

Git worktrees let you check out multiple branches in separate directories simultaneously using 'git worktree add'. This allows parallel AI agents or experiments to work without branch switching, and failed experiments can be removed cleanly.

How do I find which commit introduced a bug?▼

Use git bisect: mark the current commit as bad and a known-good commit as good, then git checks out midpoints for you to test until the faulty commit is found. Git blame and git log --grep also help narrow down changes.

What files should never be committed to git?▼

Never commit .env files, secrets, node_modules, or build output like dist/. Set up a .gitignore immediately and scan staged diffs for passwords, API keys, and tokens before every commit.