git-workflow-and-versioning

Structures git commits, branching, and pre-commit hygiene for .NET projects.

7|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/peterblazejewicz/claude-plugins --skill git-workflow-and-versioning-peterblazejewicz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-workflow-and-versioning
Source: https://github.com/peterblazejewicz/claude-plugins/tree/main/plugins/dotnet-skills/skills/git-workflow-and-versioning
Command: npx skills add https://github.com/peterblazejewicz/claude-plugins --skill git-workflow-and-versioning-peterblazejewicz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents and developers generating code at high speed often produce giant unreviewable commits, vague messages, and tangled histories. This Skill enforces disciplined version control for .NET/C# projects so every change stays reviewable, revertable, and documented. ## Core Features & Use Cases - Atomic commit discipline: Enforces one logical change per commit with conventional message types (feat, fix, refactor, test, docs, chore) and ~100-line sizing guidance. - Trunk-based branching and worktrees: Recommends short-lived feature branches and git worktrees so parallel agents each get isolated bin//obj/ output without NuGet restore conflicts. - Pre-commit hygiene pipeline: Runs dotnet test, dotnet format --verify-no-changes, and dotnet build -warnaserror before every commit, with Husky.Net automation and secret scanning. - Use Case: An agent implementing a task-creation feature commits each slice separately (FluentValidation endpoint, Avalonia view, xUnit tests), and when a test fails it reverts to the last save point instead of losing all work. ## Quick Start Ask the agent to commit the current .NET changes following atomic commit conventions with dotnet test and format verification.

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 for .NET projects?

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

How to run multiple AI agents on the same git repository in parallel?

Use git worktrees to give each agent its own directory and branch, such as 'git worktree add ../myapp-feature-a feature/task-creation'. Each worktree has separate bin/ and obj/ folders, avoiding NuGet restore conflicts between parallel builds.

What should run in a pre-commit hook for a .NET solution?

Run dotnet test, dotnet format --verify-no-changes, and dotnet build -warnaserror before every commit, plus a grep of the staged diff for secrets like connection strings. Husky.Net with a task-runner.json file can automate these checks.

Should I commit EF Core migrations and Directory.Packages.props?

Yes, commit generated files the project expects, including EF Core migrations under Migrations/ and Directory.Packages.props. Never commit bin/, obj/, .vs/, *.user files, or appsettings.*.local.json containing local secrets.

How do I find which commit introduced a bug in git?

Use git bisect to binary-search history: mark a bad and a good commit, then let git check out midpoints. You can automate it with 'git bisect run dotnet test --filter' targeting the failing test name.

When should I avoid long-lived feature branches?

Avoid branches living longer than 1-3 days because they accumulate merge risk and diverge from main. For incomplete features, deploy behind feature flags using IOptions<FeatureOptions> instead of keeping work on a branch for weeks.