git-workflow
Skill0 starsChanged 28 days agoMITView on GitHub
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.
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
Files
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-bugGitHub Flow (Recommandé)
main (production)
├── feature/user-auth
├── feature/payment
└── feature/dashboardRègles :
mainest 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
| Type | Description | Exemple |
feat | Nouvelle fonctionnalité | feat(auth): add OAuth login |
fix | Correction de bug | fix(api): handle null response |
docs | Documentation | docs(readme): update install steps |
style | Formatage (pas de changement logique) | style: fix prettier issues |
refactor | Refactorisation | refactor(auth): extract validation |
perf | Amélioration de performance | perf(api): add caching |
test | Ajout de tests | test(auth): add unit tests |
build | Build system | build: update webpack config |
ci | CI/CD | ci: add github actions |
chore | Maintenance | chore: update dependencies |
revert | Revert | revert: feat(auth): add OAuth |
Exemples
# 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
# 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 main2. Pendant le développement
# 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-feature3. Avant de créer une PR
# 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-lease4. Créer une PR
# 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-leadsRebase vs Merge
Rebase (Recommandé pour les features)
# 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 mainAvantages : Historique linéaire, propre Inconvénients : Réécrit l'historique, dangereux sur les branches partagées
Merge (Recommandé pour les releases)
# Après merge
main: A → B → C → M (merge commit)
feature: D → E
# Commande
git checkout main
git merge featureAvantages : Préserve l'historique, sûr pour les branches partagées Inconvénients : Historique plus complexe
Sauvegarde et Récupération
Stash
# 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
# 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
// 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
// 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
# 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 bonChecklist 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
| Pattern | Problème | Solution |
| Force push sur main | Perd l'historique | Utiliser des PRs |
| Grand commit | Difficile à review | Séparer par fonctionnalité |
| Merge sans PR | Pas de review | Toujours passer par des PRs |
| Commit de secrets | Sécurité compromise | Utiliser des .env |
| Historique sale | Difficile à naviguer | Utiliser rebase régulièrement |
Other versions182 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 182
- langfuse/langfuse★ 37ksame name
- modelcontextprotocol/typescript-sdk★ 14ksame name
- JetBrains/ideavim★ 10ksame name
- Galaxy-Dawn/claude-scholar★ 5.9ksame name
- github/gh-aw★ 5.5ksame name
- modelcontextprotocol/csharp-sdk★ 4.6ksame name
- antonbabenko/pre-commit-terraform★ 3.8ksame name
- microsoft/Generative-AI-for-beginners-dotnet★ 3.2ksame name
- jd-opensource/xllm★ 1.6ksame name
- microsoft/waza★ 1.5ksame name
172 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.
Used alongsideProjects with it also use squad-commands, architectural-proposals 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.
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 5 projects that use this
MicrosoftSkillarchitectural-proposals
How to write comprehensive architectural proposals that drive alignment before code is written
Also in 4 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
- +9 more from microsoft
In this repository43 other files it gives its agents.
- 3d-performance-accessibilitySkill
- 3d-web-designSkill
- accessibilitySkill
- admin-shellSkill
- anti-hallucinationSkill
- api-designSkill
- architectureSkill
- backoffice-designSkill
- banner-designSkill
- bragSkill
- brag-slimSkill
- brandSkill
- ci-cd-automationSkill
- coding-standardsSkill
- context-engineeringSkill
- databaseSkill
- data-tablesSkill
- designSkill
- design-system-shadcnSkill
- design-systemSkill
- documentationSkill
- form-designSkill
- gsap-coreSkill
- gsap-frameworksSkill
- gsap-performanceSkill
- gsap-pluginsSkill
- gsap-reactSkill
- gsap-scrolltriggerSkill
- gsap-timelineSkill
- gsap-utilsSkill
- monitoring-observabilitySkill
- motion-design-webSkill
- performanceSkill
- saas-design-systemSkill
- saas-system-designSkill
- saas-ui-designSkill
- securitySkill
- slidesSkill
- state-managementSkill
- testingSkill
- threejs-webglSkill
- ui-stylingSkill
- ui-ux-pro-maxSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

