git-workflow
Skill1 starsChanged 9 months agoApache-2.0View on GitHub
Git workflow automation with conventional commits, merge vs rebase decision trees, worktrees, SSH signing, and monorepo sparse checkout patterns.
- Reads credentials
- Deletes or force-pushes
- Installs packages
- Commits and pushes
118 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- Lukk17/agent-standardstheir own version, first seen Oct 5, 2026
- JameMy0001/antigravity-skills-hubtheir own version, first seen Oct 2, 2026
- NinjaSln-labs/agent-skillstheir own version, first seen Oct 2, 2026
- 1pedroosilva/databricks-genie-skillstheir own version, first seen Oct 2, 2026
- vospr/context-engineering-templatetheir own version, first seen Oct 1, 2026
- fusebase-dev/fusebase-flowtheir own version, first seen Oct 1, 2026
Used with
Projects with it also use squad-commands, typescript-patterns and 8 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.
MicrosoftSkillsquad-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 3 projects that use this
cohen-lielSkilltypescript-patterns
TypeScript best practices and patterns. Use when writing TypeScript code, defining types, working with generics, or converting JavaScript to TypeScript.
Also in 4 projects that use this
YepAPISkillbackground-jobs
Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.
Also in 3 projects that use this
Vimalk0703Skilldependency-management
Vet packages before adoption, audit for vulnerabilities, pin versions, and prevent dependency bloat.
Also in 3 projects that use this
pluginagentmarketplaceSkillmicroservices
Microservices architecture patterns and best practices. Service decomposition, inter-service communication, and distributed data management.
Also in 3 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 7 projects that use this
Other versions118 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- TheBeardedBearSAS/claude-craft★ 10616% same
Wrote their own version · 117
- JetBrains/ideavim★ 10ksame name
- Galaxy-Dawn/claude-scholar★ 5.7ksame name
- github/gh-aw★ 5.3ksame name
- microsoft/Generative-AI-for-beginners-dotnet★ 3.1ksame name
- microsoft/waza★ 1.4ksame name
- laolaoshiren/claude-code-skills-zh★ 876same name
- Mindrally/skills★ 266same name
- Azure/fleet★ 226same name
- povvo/claudikins-kernel★ 128same name
- extra-org/extra★ 113same name
107 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 repository73 other files it gives its agents.
- accessibility-wcagSkill
- api-designSkill
- api-testingSkill
- asset-optimizationSkill
- audio-systemsSkill
- aws-essentialsSkill
- ci-cd-pipelinesSkill
- codebase-analysisSkill
- code-reviewerSkill
- container-securitySkill
- cost-optimizationSkill
- database-designSkill
- data-visualizationSkill
- doc-generationSkill
- docker-kubernetesSkill
- docxSkill
- email-notificationsSkill
- env-configSkill
- flutter-mobileSkill
- framer-motionSkill
- frontend-code-reviewSkill
- frontend-designSkill
- fullstack-developerSkill
- game-enginesSkill
- gameplay-designSkill
- game-programming-languagesSkill
- game-serversSkill
- godot-4Skill
- golang-proSkill
- go-linter-configurationSkill
- graphics-renderingSkill
- i18n-localizationSkill
- incident-responseSkill
- level-designSkill
- llm-integrationSkill
- local-securitySkill
- memory-managementSkill
- monetization-systemsSkill
- monitoring-observabilitySkill
- multiplayer-netcodeSkill
- nextjs-16Skill
- notebooklm-researchSkill
- npm-packageSkill
- oauth-authSkill
- particle-systemsSkill
- performance-optimizationSkill
- playwright-testingSkill
- postgres-advancedSkill
- programming-architectureSkill
- project-migrationSkill
- publishing-platformsSkill
- python-best-practicesSkill
- react-nativeSkill
- redis-patternsSkill
- refactoring-patternsSkill
- remotion-best-practicesSkill
- rust-best-practicesSkill
- scraping-automationSkill
- security-reviewSkill
- seo-metaSkill
- The first 60 shown.
The file
Files
Conventional Commit Format
# BAD: vague, no type
git commit -m "changes"
# GOOD: clear type, scope, imperative mood
git commit -m "feat(auth): add OAuth2 login flow"
git commit -m "fix(api): handle null response in getUserData"
git commit -m "docs(readme): update installation steps"Format: type(scope): description
Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
Breaking changes:
git commit -m "feat(api)!: remove deprecated v1 endpoints"
# Or in body:
git commit -m "feat(api): migrate to v2 endpoints
BREAKING CHANGE: v1 endpoints removed, use v2"Setup Commit Linting
# Install commitlint
npm install --save-dev @commitlint/config-conventional @commitlint/cli
# Create config
cat > commitlint.config.js <<'EOF'
module.exports = { extends: ['@commitlint/config-conventional'] };
EOF
# Hook with Husky
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit $1'Merge vs Rebase Decision Tree
Question: Is the branch shared with others?
│
├─ YES → USE MERGE
│ └─ git merge feature-branch
│ (preserves branch history, safer for collaboration)
│
└─ NO → Ask: Do you want linear history?
│
├─ YES → USE REBASE
│ └─ git rebase main
│ (clean history, better for bisect)
│
└─ NO → USE MERGE
└─ git merge --no-ff feature-branch
(preserves feature branch context)Rebase workflow for feature branches:
# Daily sync (before starting work)
git checkout feature-branch
git fetch origin
git rebase origin/main
# Interactive cleanup before PR
git rebase -i origin/main
# Squash "fix typo", "wip" commits
# After PR approval
git checkout main
git merge --ff-only feature-branch # or squash in GitHub UIWhen rebase conflicts occur:
# BAD: panic and force push to main
git push --force origin main # NEVER DO THIS
# GOOD: resolve, test, continue
git rebase main
# Fix conflicts in files
git add resolved-file.js
git rebase --continue
npm test # Always test after resolving
git push --force-with-lease origin feature-branchAbort and recover:
# Rebase went wrong? Abort it
git rebase --abort
# Already committed a bad rebase? Find previous state
git reflog
# Outputs: abc123 HEAD@{1}: rebase finished
# def456 HEAD@{2}: checkout: moving from main to feature
git reset --hard def456 # Go back before rebaseGit Worktrees (Multiple Branches Simultaneously)
# BAD: stashing and switching repeatedly
git stash
git checkout hotfix-branch
# fix bug
git checkout main
git stash pop
# GOOD: use worktrees
git worktree add ../myproject-hotfix hotfix-branch
cd ../myproject-hotfix
# work on hotfix while main branch untouched in ../myproject
# List all worktrees
git worktree list
# Remove when done
git worktree remove ../myproject-hotfixUse case: review PR while keeping main branch clean:
git worktree add ../myproject-pr-review pr/123
cd ../myproject-pr-review
npm install
npm test
# Review done
cd ../myproject
git worktree remove ../myproject-pr-reviewSSH Commit Signing Setup
# Generate signing key (Ed25519)
ssh-keygen -t ed25519 -C "your.email@example.com" -f ~/.ssh/git_signing
# Add public key to GitHub: Settings → SSH and GPG keys → New SSH key
# Paste contents of ~/.ssh/git_signing.pub, select "Signing Key"
# Configure git to use SSH signing
git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/git_signing.pub
git config --global commit.gpgsign true
git config --global tag.gpgsign true
# Test it
git commit --allow-empty -m "test: verify SSH signing"
git log --show-signature
# Should show: "Good signature with ED25519 key..."Per-repository signing:
cd my-project
git config user.signingkey ~/.ssh/git_signing_work.pub # Different key for workMonorepo with Sparse Checkout
Problem: Monorepo with 50 packages, you only work on 2.
# BAD: clone entire 5GB repo
git clone https://github.com/company/monorepo.git
# Downloads 5GB, slow npm install across all packages
# GOOD: sparse checkout
git clone --filter=blob:none --sparse https://github.com/company/monorepo.git
cd monorepo
git sparse-checkout init --cone
git sparse-checkout set packages/frontend packages/api
# Only these directories are checked out:
# packages/frontend/
# packages/api/
# Root files (package.json, etc.)Add more packages later:
git sparse-checkout add packages/shared-uiFull monorepo strategy:
# 1. Initialize sparse checkout
git clone --filter=blob:none --sparse https://github.com/company/monorepo.git
cd monorepo
# 2. Set up workspace
git sparse-checkout set packages/my-app libs/shared-utils
# 3. Install dependencies (only for checked out packages)
npm install # or pnpm/yarn
# 4. Configure CODEOWNERS (in repo root)
cat > .github/CODEOWNERS <<'EOF'
/packages/frontend/ @frontend-team
/packages/api/ @backend-team
/libs/shared-utils/ @platform-team
EOF
# 5. Tag releases per package
git tag @company/frontend@1.2.0
git tag @company/api@2.1.5
git push origin --tagsMerge Conflict Resolution
# List conflicted files
git diff --name-only --diff-filter=U
# BAD: manually edit without understanding
vim conflicted.js # Hope for the best
# GOOD: use strategy for simple conflicts
git checkout --theirs package-lock.json # Take their version
git checkout --ours config/local.json # Keep our version
git add package-lock.json config/local.json
# For complex conflicts, use mergetool
git mergetool --tool=vimdiff # or meld, kdiff3, vscodeTest after every conflict resolution:
git rebase --continue
npm test || (git rebase --abort && echo "Tests failed, fix conflicts")Git Hooks with Lefthook
# Install lefthook (faster, polyglot alternative to Husky)
go install github.com/evilmartians/lefthook@latest
# Or: npm install lefthook --save-dev
# Create lefthook.yml
cat > lefthook.yml <<'EOF'
pre-commit:
parallel: true
commands:
lint:
glob: "*.{js,ts}"
run: eslint --fix {staged_files}
format:
glob: "*.{js,ts,json,md}"
run: prettier --write {staged_files}
types:
glob: "*.{ts,tsx}"
run: tsc --noEmit
commit-msg:
commands:
commitlint:
run: npx commitlint --edit {1}
pre-push:
commands:
test:
run: npm test
check-secrets:
run: gitleaks detect --no-git --verbose
EOF
# Install hooks
lefthook installBranch Strategies
Trunk-Based Development (Recommended)
# 1. Create short-lived feature branch
git checkout -b feat/user-profile
# 2. Work in small increments (1-2 days max)
git commit -m "feat(profile): add avatar upload"
git commit -m "test(profile): add avatar validation tests"
# 3. Rebase daily
git fetch origin
git rebase origin/main
# 4. Open PR when ready (same day or next day)
gh pr create --title "Add user profile avatar upload"
# 5. Squash merge to main
gh pr merge --squashGit Flow (Complex Release Cycles)
# Long-lived branches: main, develop
# Supporting: feature/*, release/*, hotfix/*
# Start feature
git checkout develop
git checkout -b feature/payment-integration
# Finish feature
git checkout develop
git merge --no-ff feature/payment-integration
git branch -d feature/payment-integration
# Create release branch
git checkout -b release/1.2.0 develop
# Fix bugs in release/1.2.0
# Merge to main and develop
git checkout main
git merge --no-ff release/1.2.0
git tag -a v1.2.0 -m "Release v1.2.0"
git checkout develop
git merge --no-ff release/1.2.0
git branch -d release/1.2.0Only use Git Flow if:
- Multiple versions in production (e.g., SaaS with customer-specific deployments)
- Regulated industry requiring formal release process
- Large team (50+) with parallel release tracks
Troubleshooting
# Lost commits after reset
git reflog
git cherry-pick abc123 # Restore lost commit
# Committed to wrong branch
git log # Copy commit hash
git checkout correct-branch
git cherry-pick abc123
git checkout wrong-branch
git reset --hard HEAD~1 # Remove from wrong branch
# Remove file from history (leaked secret)
git filter-repo --path secrets.env --invert-paths
# Note: force push required, coordinate with team
# Undo last commit (keep changes staged)
git reset --soft HEAD~1
# Undo last commit (keep changes unstaged)
git reset HEAD~1
# Undo last commit (discard changes - CAREFUL)
git reset --hard HEAD~1Does 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.

