agentleFS
edjchapmanedjchapman/claude-code-config/skills/git-workflow/SKILL.md

git-workflow

Skill8 starsChanged 19 days agoMITView on GitHub

Git branching, commits, PRs, and release workflows. Use for anything under .git, and for tricky operations — interactive rebase, cherry-picking, bisecting, reflog recovery. To resolve an in-progress merge or rebase conflict, use the resolving-merge-conflicts skill.

  • Deletes or force-pushes

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use squad-commands, ci-cd-pipelines and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Microsoft AzureSkill

    squad-commands

    Categorized catalog of common Squad operations. Coordinator reads this file and presents it as an interactive menu when the user asks for available commands or help.

    Also in 5 projects that use this

  • harrissohail6Skill

    ci-cd-pipelines

    CI/CD pipeline design and implementation. Auto-activates when discussing deployment, automation, or pipelines.

    Also in 6 projects that use this

  • Microsoft AzureSkill

    architectural-proposals

    How to write comprehensive architectural proposals that drive alignment before code is written

    Also in 4 projects that use this

  • GitHubSkill

    e2e-template-testing

    End-to-end validation of coordinator and agent template changes

    Also in 3 projects that use this

  • GitHubSkill

    notification-routing

    Route agent notifications to specific channels by type — prevent alert fatigue from single-channel flooding

    Also in 3 projects that use this

  • frostneySkill

    native-nostalgia-stack

    Applies the user's FreePascal toolchain and its build, formatting, hook, and test contracts while leaving project-specific mechanics local. Use when scaffolding or working in a FreePascal project that follows this toolchain.

    Also in 3 projects that use this

  • +5 more from Azure
  • +1 more from github

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 165 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow these conventions for all git operations in this project.

    line 8
  2. Distinctive:

    Use Conventional Commits format:

    line 12
  3. Distinctive:

    No period at end of subject line

    line 38
  4. Distinctive:

    If larger, split into stacked PRs or feature flags

    line 59
  5. Distinctive:

    Test plan: how to verify the change

    line 66
  6. Distinctive:

    No TODO/FIXME without linked tickets

    line 73
  7. Very specific:

    Create a backup branch: git branch backup-before-<operation>

    line 83
  8. Very specific:

    If it goes wrong: git rebase --abort / git merge --abort / git cherry-pick --abort, or git reset --hard <backup>

    line 86

“Common” is measured: kept by at least 6 in 10 of the 165 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Git Workflow

Follow these conventions for all git operations in this project.

Commit Messages

Use Conventional Commits format:

<type>(<scope>): <description>

[optional body]

[optional footer]

Types

  • feat: New feature or functionality
  • fix: Bug fix
  • docs: Documentation only
  • style: Formatting, missing semicolons (no code change)
  • refactor: Code restructuring (no feature/fix)
  • test: Adding or updating tests
  • chore: Maintenance tasks, dependencies
  • ci: CI/CD changes
  • perf: Performance improvements

Rules

  • First line under 72 characters
  • Imperative mood: "add feature" not "added feature"
  • No period at end of subject line
  • Blank line between subject and body
  • Reference issue/ticket in footer: Refs: PROJ-123

Branch Naming

<type>/<ticket>-<short-description>

Examples:

  • feature/BIL-123-user-authentication
  • fix/BIL-456-login-redirect-loop
  • chore/BIL-789-upgrade-dependencies

Pull Request Guidelines

Size

  • Aim for under 400 lines changed
  • If larger, split into stacked PRs or feature flags
  • One logical change per PR

Description

  • Summary of what and why (not how)
  • Link to ticket/issue
  • Test plan: how to verify the change
  • Screenshots for UI changes

Review Checklist

  • Tests pass
  • No linting errors
  • No TODO/FIXME without linked tickets
  • Migration safety considered (for DB changes)
  • Backwards compatibility assessed

Complex Operations

Approach: understand the current state (git status, git log), assess what could be lost, create a safety net, then execute step by step.

Safety Net Before Dangerous Operations

  • Create a backup branch: git branch backup-before-<operation>
  • Note current HEAD: git rev-parse HEAD
  • Stash uncommitted changes: git stash
  • If it goes wrong: git rebase --abort / git merge --abort / git cherry-pick --abort, or git reset --hard <backup>

Recovering Lost Commits

git reflog                     # all recent HEAD positions - your safety net
git branch recovery <hash>     # create branch at a lost commit
git cherry-pick <hash>         # apply a lost commit to current branch
git checkout <commit> -- <file>  # restore one file from a commit

Bisecting a Regression

git bisect start
git bisect bad HEAD
git bisect good <known-good>
git bisect run <test-command>  # exits 0 for good, non-zero for bad
git bisect reset               # when done

Resolving Merge Conflicts

Resolve <<<<<<< markers per file, git add each, then git rebase --continue / git merge --continue. Keep one side wholesale with git checkout --ours <file> or --theirs <file>.

Red Flags — Proceed with Caution

  • --force push (prefer --force-with-lease), reset --hard
  • Rebasing already-pushed commits
  • Operating on shared branches (main, develop)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.