git-workflow
Skill1 starsChanged 7 months agoMITView on GitHub
Manage Git workflows: branching strategies, commit conventions, merge conflict resolution, rebase workflows, and cherry-picking. Trigger with "set up git workflow", "fix merge conflict", "rebase my branch", "cherry-pick a commit", "how should we branch", or when the user needs help with Git branching models, commit message conventions, or merge strategies.
188 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- kinhluan/skillstheir own version, first seen Nov 8, 2026
- juninmd/skillstheir own version, first seen Nov 8, 2026
- jDxve/avengers-kittheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
- haythamasalama/skillstheir own version, first seen Nov 8, 2026
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 AzureSkillsquad-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
harrissohail6Skillci-cd-pipelines
CI/CD pipeline design and implementation. Auto-activates when discussing deployment, automation, or pipelines.
Also in 6 projects that use this
Microsoft AzureSkillarchitectural-proposals
How to write comprehensive architectural proposals that drive alignment before code is written
Also in 4 projects that use this
GitHubSkille2e-template-testing
End-to-end validation of coordinator and agent template changes
Also in 3 projects that use this
GitHubSkillnotification-routing
Route agent notifications to specific channels by type — prevent alert fatigue from single-channel flooding
Also in 3 projects that use this
frostneySkillnative-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
Other versions188 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 188
- langfuse/langfuse★ 37ksame name
- modelcontextprotocol/typescript-sdk★ 14ksame name
- JetBrains/ideavim★ 10ksame name
- jokob-sk/NetAlertX★ 7.4ksame name
- netalertx/NetAlertX★ 7.4ksame name
- Galaxy-Dawn/claude-scholar★ 5.9ksame name
- github/gh-aw★ 5.6ksame name
- modelcontextprotocol/csharp-sdk★ 4.6ksame name
- antonbabenko/pre-commit-terraform★ 3.8ksame name
- github/squad★ 3.4ksame name
178 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository164 other files it gives its agents.
- instrument-data-to-allotropeSkill
- literature-reviewSkill
- nextflow-developmentSkill
- scientific-problem-selectionSkill
- scvi-toolsSkill
- single-cell-rna-qcSkill
- discover-brandSkill
- enforce-voiceSkill
- generate-guidelinesSkill
- csat-reportSkill
- customer-escalationSkill
- customer-researchSkill
- draft-responseSkill
- kb-articleSkill
- sentiment-analysisSkill
- ticket-triageSkill
- analyzeSkill
- build-dashboardSkill
- create-vizSkill
- data-context-extractorSkill
- data-modelingSkill
- data-pipelineSkill
- etl-designSkill
- explore-dataSkill
- sql-queriesSkill
- statistical-analysisSkill
- validate-dataSkill
- write-querySkill
- accessibility-reviewSkill
- component-librarySkill
- design-critiqueSkill
- design-handoffSkill
- design-systemSkill
- frontend-designSkill
- research-synthesisSkill
- user-researchSkill
- ux-copySkill
- wireframingSkill
- Agent DevelopmentSkill
- CLAUDE.md ManagementSkill
- MCP Server BuilderSkill
- Plugin DevelopmentSkill
- Prompt EngineeringSkill
- Skill CreatorSkill
- curriculum-designSkill
- lesson-planningSkill
- quiz-generatorSkill
- study-guideSkill
- tutoringSkill
- api-designSkill
- architectureSkill
- ci-cd-pipelineSkill
- code-reviewSkill
- database-migrationSkill
- debugSkill
- dependency-auditSkill
- deploy-checklistSkill
- documentationSkill
- error-handlingSkill
- incident-responseSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. 0 are common, 14 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 165 edited versions we read keep these.
14
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 34
Branch strategy request: Check the repo structure with git branch -a, look at existing branches, and review the team size and release …
- Distinctive: line 35
Commit convention: Read recent commit history with git log --oneline -20 to understand current patterns.
- Distinctive: line 36
Merge conflict: Run git status to identify conflicted files, then git diff to see the conflict markers.
- Very specific: line 37
Rebase request: Check the current branch with git branch --show-current, its upstream with git log --oneline HEAD..origin/main, and …
- Very specific: line 41
Look for .gitconfig, .gitattributes, and .gitignore at repo root.
- Very specific: line 42
Check for branch protection rules in .github/ settings or CI config.
- Very specific: line 43
Look for commit message templates in .gitmessage or hook scripts in .husky/ or .git/hooks/.
- Distinctive: line 59
No develop branch; deploy directly from main after merge
- Very specific: line 110
Add a commitlint.config.js to the repo root.
- Distinctive: line 114
When the user has a merge conflict:
- Very specific: line 116
Identify conflicts: Run git status and list all files with UU (both modified) status.
- Distinctive: line 152
Never rebase commits that have been pushed and shared with others.
- Distinctive: line 172
Always reference the original commit in the cherry-picked message.
- Very specific: line 173
Use -x flag to append the original commit hash: git cherry-pick -x <hash>.
- Distinctive: line 174
Prefer cherry-picking to release branches, not the other way around.
- Distinctive: line 175
If a cherry-pick conflicts, resolve carefully since the surrounding code may differ between branches.
- Distinctive: line 211
Action: Run git status, read the conflicted file, explain both sides of the conflict, suggest the correct resolution, and walk through …
- Very specific: line 217
Action: Check out the release branch, cherry-pick with -x, resolve any conflicts, verify the result.
- Distinctive: line 221
Always fetch before rebasing or merging to work with the latest remote state.
- Distinctive: line 222
Use git stash before switching branches if you have uncommitted work.
- Very specific: line 223
Prefer --no-ff merges for feature branches to preserve branch topology in history.
- Distinctive: line 225
Use git reflog to recover from mistakes — it tracks all HEAD movements for 90 days.
- Distinctive: line 226
Never force-push to shared branches without coordinating with the team.
- Very specific: line 227
When in doubt about a destructive operation, create a backup branch first: git branch backup/<name>.
“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.
Files
Git Workflow Management
Help teams establish and follow effective Git workflows. Covers branching strategies, commit conventions, merge conflict resolution, interactive rebase, and cherry-picking across branches.
Workflow
Step 1: Assess the Current Situation
Determine what Git help is needed and gather context:
- Branch strategy request: Check the repo structure with
git branch -a, look at existing branches, and review the team size and release cadence. - Commit convention: Read recent commit history with
git log --oneline -20to understand current patterns. - Merge conflict: Run
git statusto identify conflicted files, thengit diffto see the conflict markers. - Rebase request: Check the current branch with
git branch --show-current, its upstream withgit log --oneline HEAD..origin/main, and divergence point. - Cherry-pick: Identify the source commit with
git log --oneline <branch>and the target branch.
Also check for existing configuration:
- Look for
.gitconfig,.gitattributes, and.gitignoreat repo root. - Check for branch protection rules in
.github/settings or CI config. - Look for commit message templates in
.gitmessageor hook scripts in.husky/or.git/hooks/.
Step 2: Branching Strategy
Recommend a branching strategy based on the team's needs:
Git Flow (best for versioned releases, larger teams)
main— production-ready code, tagged releasesdevelop— integration branch for featuresfeature/<name>— individual feature workrelease/<version>— release stabilizationhotfix/<name>— urgent production fixes
GitHub Flow (best for continuous deployment, smaller teams)
main— always deployablefeature/<name>— short-lived branches, merged via PR- No develop branch; deploy directly from main after merge
Trunk-Based Development (best for CI/CD-heavy teams)
main— single source of truth- Short-lived feature branches (< 2 days)
- Feature flags for incomplete work
- Release branches cut from main only when needed
Release Branch Model (best for supporting multiple versions)
main— latest developmentrelease/v1.x,release/v2.x— long-lived release branches- Fixes cherry-picked from main to release branches
Step 3: Commit Conventions
Recommend and enforce commit message standards:
Conventional Commits Format:
<type>(<scope>): <subject>
<body>
<footer>Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
Examples:
feat(auth): add OAuth2 login with Google provider
Implements Google OAuth2 flow using passport-google-oauth20.
Adds session persistence and token refresh logic.
Closes #142fix(api): prevent race condition in order processing
Multiple concurrent requests could create duplicate orders
when the idempotency check used a non-atomic read-then-write.
Switched to database-level unique constraint on idempotency_key.
Fixes #287Enforcing conventions:
- Suggest installing
commitlintwith@commitlint/config-conventional. - Set up a commit-msg hook via Husky:
npx husky add .husky/commit-msg 'npx commitlint --edit $1'. - Add a
commitlint.config.jsto the repo root.
Step 4: Merge Conflict Resolution
When the user has a merge conflict:
- Identify conflicts: Run
git statusand list all files withUU(both modified) status. - Read each conflict: Open each conflicted file and locate
<<<<<<<,=======,>>>>>>>markers. - Understand both sides: Explain what the current branch changed vs. what the incoming branch changed.
- Resolve: Suggest the correct resolution based on intent. Options:
- Accept current (ours):
git checkout --ours <file> - Accept incoming (theirs):
git checkout --theirs <file> - Manual merge: Edit the file to combine both changes logically.
- Accept current (ours):
- Mark resolved:
git add <file>for each resolved file. - Complete:
git merge --continueorgit rebase --continuedepending on the operation.
For complex conflicts, use git log --merge -p <file> to see the full change history on both sides.
Step 5: Rebase Workflows
Simple rebase onto main:
git fetch origin
git rebase origin/main
# Resolve any conflicts, then:
git rebase --continueInteractive rebase to clean up history:
git rebase -i HEAD~<n>pick— keep the commit as-issquash— combine with the previous commitfixup— like squash but discard the commit messagereword— change the commit messageedit— pause to amend the commitdrop— remove the commit entirely
When to rebase vs. merge:
- Rebase for a clean, linear history on feature branches before merging to main.
- Merge (with merge commit) to preserve the feature branch history.
- Never rebase commits that have been pushed and shared with others.
Step 6: Cherry-Picking
Basic cherry-pick:
git cherry-pick <commit-hash>Cherry-pick without committing (to review first):
git cherry-pick --no-commit <commit-hash>Cherry-pick a range:
git cherry-pick <start-hash>^..<end-hash>Best practices for cherry-picking:
- Always reference the original commit in the cherry-picked message.
- Use
-xflag to append the original commit hash:git cherry-pick -x <hash>. - Prefer cherry-picking to release branches, not the other way around.
- If a cherry-pick conflicts, resolve carefully since the surrounding code may differ between branches.
Output Format
## Git Workflow Recommendation
### Branching Strategy: <strategy name>
**Why this fits your team**: <rationale based on team size, release cadence, deployment model>
### Branch Naming Convention
- Feature: `feature/<ticket-id>-<short-description>`
- Bugfix: `fix/<ticket-id>-<short-description>`
- Release: `release/v<major>.<minor>`
- Hotfix: `hotfix/<ticket-id>-<short-description>`
### Commit Convention
<format with examples>
### Merge Policy
- [ ] Require PR reviews (minimum <n> approvers)
- [ ] Require CI passing before merge
- [ ] Squash merge for feature branches / merge commit for releases
- [ ] Delete branch after merge
### Setup Commands
<exact commands to configure hooks, tools, branch protections>Examples
User: "We're a team of 5, deploying multiple times a day. What Git workflow should we use?" Action: Recommend GitHub Flow or Trunk-Based Development. Provide branch naming, commit conventions, and CI/CD integration guidance.
User: "I have a merge conflict in src/api/users.ts"
Action: Run git status, read the conflicted file, explain both sides of the conflict, suggest the correct resolution, and walk through completing the merge.
User: "Clean up my last 4 commits before I open a PR"
Action: Guide through git rebase -i HEAD~4, suggest squashing related commits, reword messages to follow conventions.
User: "Cherry-pick commit abc123 from main into release/v2.1"
Action: Check out the release branch, cherry-pick with -x, resolve any conflicts, verify the result.
Best Practices
- Always fetch before rebasing or merging to work with the latest remote state.
- Use
git stashbefore switching branches if you have uncommitted work. - Prefer
--no-ffmerges for feature branches to preserve branch topology in history. - Set
pull.rebase = truein git config for teams using rebase workflows. - Use
git reflogto recover from mistakes — it tracks all HEAD movements for 90 days. - Never force-push to shared branches without coordinating with the team.
- When in doubt about a destructive operation, create a backup branch first:
git branch backup/<name>. - Configure
.gitattributesfor consistent line endings and merge drivers for lock files.
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
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.

