common-git

Defines Git commit, pull request, and branching conventions using Conventional Commits and Semantic Versioning.

138|5|Updated Sep 19, 2024
One-click install
npx skills add https://github.com/macalbert/envilder --skill common-git-macalbert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: common-git
Source: https://github.com/macalbert/envilder/tree/main/.github/skills/common-git
Command: npx skills add https://github.com/macalbert/envilder --skill common-git-macalbert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams often produce inconsistent commit messages, unclear PR titles, and tangled branch histories, making code reviews and release tracking difficult. This Skill standardizes Git workflow conventions so every commit, PR, and release follows the same predictable format. ## Core Features & Use Cases - Conventional Commits enforcement: Provides commit message formats with types like feat, fix, docs, refactor, test, and chore, plus subject-line rules and body guidelines. - PR workflow and branching strategy: Defines squash-and-merge policy, trunk-based development on main, and branch naming patterns like user/feat/feature-name. - Semantic Versioning releases: Specifies vMAJOR.MINOR.PATCH tagging with annotated git tag commands. - Use Case: When finishing a bug fix, ask the AI to write the commit message and it will produce a properly formatted message like "fix(cli): correct map file path resolution on Windows" with an explanatory body. ## Quick Start Ask the AI to write a conventional commit message and PR title for the changes you just made to the repository.

Frequently Asked Questions about common-git

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

FAQPage Schema
How do I write a Conventional Commits message?

Use the format type(scope): subject, where type is feat, fix, docs, style, refactor, test, or chore. Keep the subject under 50 characters, capitalized, in imperative mood, with no trailing period, and add a blank line before an optional body explaining what and why.

What branch naming convention should I use for trunk-based development?

Create short-lived branches from main using the pattern username/type/name, such as macalbert/feat/add-azure-provider or macalbert/fix/windows-path-resolution. Delete the branch after the PR is squash-merged to keep history clean.

How do I tag a release with Semantic Versioning in Git?

Create an annotated tag with git tag -a v2.1.0 -m "Release v2.1.0 - description" and push it with git push origin v2.1.0. Increment MAJOR for breaking changes, MINOR for backward-compatible features, and PATCH for bug fixes.

Should I squash and merge or use merge commits for pull requests?

Use squash and merge so all PR commits collapse into a single conventional commit on main. This keeps the history linear and readable while the PR title follows the same conventional format as commits.

When should I use the chore commit type instead of feat or fix?

Use chore for build process changes, dependency updates, and tooling work that does not affect user-facing behavior. Use feat for new user-facing features and fix for user-facing bug corrections.