eliabdevweb-svg/opencode-skills-mcp/git-workflow

Claude Code and agent skill by eliabdevweb-svg/opencode-skills-mcp

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Workflow Git professionnel, branching strategies, commit conventions, et collaboration d'équipe. Use when creating branches, writing or fixing commits, rebasing, resolving merge conflicts, reviewing pull requests, or when the user mentions git, branche, commit, merge, rebase ou convention de commit.

Install

npx vskill@latest install eliabdevweb-svg/opencode-skills-mcp/git-workflow

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as eliabdevweb-svg/opencode-skills-mcp/git-workflow.

Git Workflow

Guide pour un workflow Git professionnel et une collaboration d'équipe efficace.

Branching Strategy

Git Flow
main (production)
├── develop (intégration)
│ ├── feature/user-auth
│ ├── feature/payment
│ └── feature/dashboard
├── release/v1.2.0
└── hotfix/critical-bug
GitHub Flow (Recommandé)
main (production)
├── feature/user-auth
├── feature/payment
└── feature/dashboard

Règles :

  • main est toujours déployable
  • Toutes les branches partent de main
  • Les PRs sont requises pour merger
  • Le CI doit passer avant le merge

Conventional Commits

Format
<type>(<scope>): <subject>
<body>
<footer>
Types
TypeDescriptionExemple
featNouvelle fonctionnalitéfeat(auth): add OAuth login
fixCorrection de bugfix(api): handle null response
docsDocumentationdocs(readme): update install steps
styleFormatage (pas de changement logique)style: fix prettier issues
refactorRefactorisationrefactor(auth): extract validation
perfAmélioration de performanceperf(api): add caching
testAjout de teststest(auth): add unit tests
buildBuild systembuild: update webpack config
ciCI/CDci: add github actions
choreMaintenancechore: update dependencies
revertRevertrevert: feat(auth): add OAuth
Exemples
bash
# Feature
git commit -m "feat(user): add profile page"
# Fix
git commit -m "fix(auth): prevent token expiration race condition"
# Breaking change
git commit -m "feat(api)!: change response format
BREAKING CHANGE: API responses now use camelCase instead of snake_case"
# Avec body
git commit -m "feat(payment): add Stripe integration
- Add Stripe SDK
- Create payment intent endpoint
- Handle webhook events
- Add idempotency keys
Closes #123"

Workflow Quotidien

1. Début de journée
bash
# Récupérer les dernières modifications
git fetch origin
git checkout main
git pull origin main
# Créer ou mettre à jour sa branche feature
git checkout -b feature/my-feature
# ou
git checkout feature/my-feature
git rebase main
2. Pendant le développement
bash
# Travailler par petits commits
git add -p # Stage sélectif
git commit -m "feat(auth): add login form"
# Pousser régulièrement
git push origin feature/my-feature
3. Avant de créer une PR
bash
# Nettoyer l'historique
git rebase -i main
# Squasher les commits de wip
git rebase -i HEAD~5
# Pousser avec force (après rebase)
git push origin feature/my-feature --force-with-lease
4. Créer une PR
bash
# Depuis GitHub CLI
gh pr create \
--title "feat(auth): add OAuth login" \
--body "## Description
Add OAuth login with Google and GitHub
## Changes
- Add OAuth provider configuration
- Create callback handlers
- Add session management
## Testing
- [ ] Unit tests added
- [ ] Integration tests pass
- [ ] Manual testing done
Closes #123" \
--reviewer team-leads

Rebase vs Merge

Rebase (Recommandé pour les features)
bash
# Avant
main: A → B → C
feature: D → E
# Après rebase
main: A → B → C
feature: D' → E' (rejoués sur C)
# Commande
git checkout feature
git rebase main

Avantages : Historique linéaire, propre Inconvénients : Réécrit l'historique, dangereux sur les branches partagées

Merge (Recommandé pour les releases)
bash
# Après merge
main: A → B → C → M (merge commit)
feature: D → E
# Commande
git checkout main
git merge feature

Avantages : Préserve l'historique, sûr pour les branches partagées Inconvénients : Historique plus complexe

Sauvegarde et Récupération

Stash
bash
# Sauvegarder les changements
git stash push -m "work in progress"
# Lister les stashes
git stash list
# Récupérer le stash
git stash pop
# Récupérer un stash spécifique
git stash apply stash@{1}
Undo
bash
# Annuler le dernier commit (garder les changements)
git reset --soft HEAD~1
# Annuler le dernier commit (perdre les changements)
git reset --hard HEAD~1
# Annuler un push (dangereux)
git push --force-with-lease
# Révertir un commit (crée un nouveau commit)
git revert <commit-hash>

Git Hooks

Husky + lint-staged
json
// package.json
{
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
"*.{ts,tsx}": ["eslint --fix", "prettier --write"],
"*.{json,md}": ["prettier --write"]
}
}
Commitlint
javascript
// commitlint.config.js
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [2, 'always', [
'feat', 'fix', 'docs', 'style', 'refactor',
'perf', 'test', 'build', 'ci', 'chore', 'revert'
]],
'subject-max-length': [2, 'always', 72]
}
};

Commands Utiles

bash
# Information
git log --oneline --graph --all # Visualiser l'historique
git diff main # Diff avec main
git blame file.ts # Qui a écrit quoi
git shortlog -sn # Contributeurs
# Nettoyage
git gc --aggressive # Garbage collection
git clean -fd # Supprimer les fichiers non trackés
# Avancé
git bisect start # Trouver le commit qui a cassé
git bisect bad # Commit actuel est mauvais
git bisect good <commit> # Ce commit était bon

Checklist PR

  • [ ] Le code suit-il les conventions de commit ?
  • [ ] Les tests passent-ils ?
  • [ ] Le lint passe-t-il ?
  • [ ] La documentation est-elle mise à jour ?
  • [ ] Les breaking changes sont-ils documentés ?
  • [ ] Le reviewer est-il assigné ?
  • [ ] La description de la PR est-elle claire ?

Anti-Patterns

PatternProblèmeSolution
Force push sur mainPerd l'historiqueUtiliser des PRs
Grand commitDifficile à reviewSéparer par fonctionnalité
Merge sans PRPas de reviewToujours passer par des PRs
Commit de secretsSécurité compromiseUtiliser des .env
Historique saleDifficile à naviguerUtiliser rebase régulièrement

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/eliabdevweb-svg/opencode-skills-mcp/git-workflow/badge)](https://verified-skill.com/skills/eliabdevweb-svg/opencode-skills-mcp/git-workflow)

Something wrong with this skill or its page? Tell us.