Get the FREE Ultimate OpenClaw Setup Guide →

git-workflow

npx machina-cli add skill netresearch/git-workflow-skill/git-workflow --openclaw
Files (1)
SKILL.md
4.0 KB

Git Workflow Skill

Expert patterns for Git version control: branching, commits, collaboration, and CI/CD.

Expertise Areas

  • Branching: Git Flow, GitHub Flow, Trunk-based development
  • Commits: Conventional Commits, semantic versioning
  • Collaboration: PR workflows, code review, merge strategies, thread resolution
  • CI/CD: GitHub Actions, GitLab CI, branch protection

Reference Files

ReferenceWhen to Load
references/branching-strategies.mdManaging branches, choosing branching model
references/commit-conventions.mdWriting commits, semantic versioning
references/pull-request-workflow.mdCreating/reviewing PRs, thread resolution, merging
references/ci-cd-integration.mdCI/CD automation, GitHub Actions
references/advanced-git.mdRebasing, cherry-picking, bisecting
references/github-releases.mdRelease management, immutable releases
references/code-quality-tools.mdShell linting, formatting, smart fixups, structural diffs

Explicit Content Triggers

When creating pull requests, load references/pull-request-workflow.md for PR structure, size guidelines, and template patterns.

When reviewing PRs or responding to review comments, load references/pull-request-workflow.md for review comment levels (blocking/suggestion/nit) and the code review checklist.

When replying to PR review threads or resolving threads, load references/pull-request-workflow.md for the GraphQL API patterns for thread replies and resolution.

When merging PRs, load references/pull-request-workflow.md for the merge requirements checklist (resolved threads, Copilot review, rebased branch, CI checks).

When merging in repos requiring signed commits with rebase-only strategy, load references/pull-request-workflow.md for the local fast-forward merge workflow.

When handling merge conflicts, load references/pull-request-workflow.md for conflict resolution strategies.

When choosing a branching strategy, load references/branching-strategies.md for Git Flow, GitHub Flow, and Trunk-based patterns.

When writing commit messages, load references/commit-conventions.md for Conventional Commits format and semantic versioning rules.

When creating releases, load references/github-releases.md for immutable release warnings and recovery patterns.

When running a full PR lifecycle (CI check → resolve comments → merge → cleanup), load references/pull-request-workflow.md for the complete PR merge checklist.

When CI is failing on a PR and you need to fix it before merging, load references/pull-request-workflow.md for the CI verification and annotation checking patterns.

Conventional Commits (Quick Reference)

<type>[scope]: <description>

Types: feat (MINOR), fix (PATCH), docs, style, refactor, perf, test, build, ci, chore, revert

Breaking change: Add ! after type or BREAKING CHANGE: in footer.

Branch Naming

feature/TICKET-123-description
fix/TICKET-456-bug-name
release/1.2.0
hotfix/1.2.1-security-patch

GitHub Flow (Default)

git checkout main && git pull
git checkout -b feature/my-feature
# ... work ...
git push -u origin HEAD
gh pr create && gh pr merge --squash

For code quality tools (shellcheck, shfmt, git-absorb, difft), see references/code-quality-tools.md.

GitHub Immutable Releases

CRITICAL: Deleted releases block tag names PERMANENTLY. Get releases right first time.

See references/github-releases.md for prevention and recovery patterns.

Verification

./scripts/verify-git-workflow.sh /path/to/repository

Contributing: https://github.com/netresearch/git-workflow-skill

Source

git clone https://github.com/netresearch/git-workflow-skill/blob/main/skills/git-workflow/SKILL.mdView on GitHub

Overview

Defines expert patterns for Git version control, including branching models (Git Flow, GitHub Flow, Trunk-based), Conventional Commits, and PR-based collaboration. It also covers PR review, merge strategies, thread management, and CI/CD integration to ensure stable releases.

How This Skill Works

The skill ties together reference files for branching, commits, PR workflows, and CI/CD to guide practical Git commands, checks, and merge actions. It explains when to rebase, how to enforce signed commits, and how to resolve conflicts during merges.

When to Use It

  • Setting up and enforcing a branching strategy across multiple teams (Git Flow, GitHub Flow, or Trunk-based).
  • Implementing Conventional Commits and semantic versioning to automate releases.
  • Creating or reviewing PRs, addressing thread comments, and applying review checklist.
  • Merging PRs with CI verification, auto-merge queues, and post-merge cleanup.
  • Handling merge conflicts and integrating Git with CI/CD tools like GitHub Actions or GitLab CI.

Quick Start

  1. Step 1: Pick a branching model (Git Flow, GitHub Flow, or Trunk-based) and apply a naming scheme like feature/BUG-123-description.
  2. Step 2: Write commits using Conventional Commits (<type>[scope]: <description>) and tag breaking changes when needed.
  3. Step 3: Create a PR, ensure CI checks pass, address review comments, and merge with signed commits, followed by post-merge cleanup.

Best Practices

  • Standardize branch naming and protection rules to prevent accidental pushes to main.
  • Enforce Conventional Commits and semantic versioning in all commits.
  • Require CI checks and signed commits for merge eligibility.
  • Prefer rebasing or fast-forward merges per policy to keep a clean history.
  • Complete PR review threads and maintain a documented merge checklist.

Example Use Cases

  • A team adopts GitHub Flow with feature branches and PRs, enabling CI checks and branch protection.
  • Conventional Commits are enforced across all commits to drive semantic versioning and changelogs.
  • Reviewers resolve PR comments and close threads using GraphQL API patterns for thread management.
  • PRs are merged only after all CI checks pass, using auto-merge queues and post-merge cleanup.
  • Merges use signed commits in a rebase-based workflow to meet repo policy, with conflict resolution guided by CI feedback.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers