rebase-current-branch
Ce qu’il fait
Cet outil met à jour votre « branche » (une ligne de travail séparée) pour y intégrer les dernières modifications de la branche principale du projet. Il le fait en toute sécurité, sans perdre votre travail.
Quand l’utiliser
- ✓Lorsque vous voulez intégrer les dernières modifications de la branche principale à votre travail.
- ✓Avant de demander à quelqu'un de relire votre code.
- ✓Lorsque vous voulez fusionner votre travail avec celui de l'équipe.
Lien du skill
https://github.com/github/awesome-copilot/blob/main/skills/rebase-current-branch/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Mets à jour mon travail avec les dernières modifications de la branche principale.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'outil vérifie d'abord s'il reste du travail non enregistré et vous demande quoi en faire. Ensuite, il récupère les dernières modifications de la branche principale et les applique par-dessus votre travail, en gardant tout bien organisé.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Rebase the Current Branch
Update the active branch by replaying its commits on top of the latest default branch from its upstream remote. Use the repository's actual default branch, whether it is named main, master, or another branch.
Workflow
Inspect before changing anything. Run
git status --porcelain=v1 --branch --untracked-files=allandgit branch --show-current. Confirm the current branch is not the default branch and note any local changes. If the working tree has changes, stop and ask the user whether to commit, stash, or otherwise handle them. Do not stash automatically.Identify the upstream and default branch. Check
git remote -vandgit remote show <remote>(or the remote's symbolicHEAD) to determine the branch this repository treats as its default. Prefer the configured upstream for the current branch when available; otherwise useorigin. Do not assume thatmainexists or that a branch namedmasteris current. If the default branch cannot be identified unambiguously, ask the user.Fetch the latest default branch. Fetch only the identified remote and default branch, for example:
git fetch <remote> <default-branch>Verify the fetched remote-tracking ref exists before continuing.
Rebase the active branch. Tell the user which branch will be rebased onto which remote-tracking branch, then run:
git rebase <remote>/<default-branch>Handle conflicts without discarding work. If the rebase stops, explain which files conflict and that the rebase is paused. Resolve only when the intended changes are clear; otherwise ask the user. After resolution, stage the resolved files and run
git rebase --continue. If the user wants to abandon the operation, rungit rebase --abort. Never usegit reset --hard, discard user changes, or skip commits to force completion.Offer validation hooks. After the rebase succeeds, inspect the repository's documented validation steps and configured hooks (for example, pre-commit hooks or lint and test scripts). Ask the user whether they want those checks run before proceeding. If they agree, run the applicable checks and report their results; do not bypass or disable hooks.
Verify the result. When the rebase completes, run
git status --porcelain=v1 --branch --untracked-files=alland summarize the outcome, including the base branch used, validation results if run, and any remaining changes. Do not push, force-push, or amend commits unless the user separately asks.
Quick Path
For a clean working tree where the upstream default branch is known, the core operation is:
git fetch <remote> <default-branch>
git rebase <remote>/<default-branch>
Replace <default-branch> with the detected branch name (main, master, or another configured default). Never run the placeholder commands literally.
Safety Rules
- Preserve the user's current branch and uncommitted work.
- Do not rebase the default branch itself.
- Do not assume local
mainormasteris up to date; rebase onto the fetched remote-tracking branch. - Do not push or force-push as part of this workflow.
- If a rebase is already in progress, inspect its state and ask whether to continue or abort; do not start another rebase.
Questions fréquentes
Qu'est-ce qu'une « branche » ?
Imaginez une branche comme une copie du projet sur laquelle vous pouvez travailler sans toucher à la version principale. C'est comme avoir un brouillon pour faire vos modifications.
Que signifie « rebase » ?
« Rebase » revient à réorganiser l'ordre de vos modifications. Au lieu de simplement fusionner, l'outil place vos changements « par-dessus » les dernières mises à jour, comme si vous aviez commencé votre travail après elles.
Que se passe-t-il en cas de conflit ?
Si votre travail et les mises à jour de la branche principale ont modifié la même partie du code, un conflit apparaît. L'outil vous en informe et vous demande de l'aide pour choisir la version à conserver.
Détails
Description originale de l’auteur
Rebase the currently checked out feature branch onto the latest upstream default branch. Use when asked to update a branch with main or master, rebase the current branch onto the default branch, or sync a feature branch before review. Detects whether the repository uses main or master and guides safe conflict handling.
repo: github/awesome-copilot
Popularité
- Étoiles GitHub
- 40k
- Position au classement
- #7393
- Licence
- MIT
- Mis à jour
- 15/10/2026
Commentaires
- …
Autres skills de ce dépôt
acquire-codebase-knowledge
40kAide votre agent à comprendre et documenter un projet de code existant. Utile pour accueillir de nouveaux membres ou obtenir une vue d'ensemble de l'architecture.
acreadiness-assess
40kPermet à votre agent d'évaluer la préparation d'un projet à l'IA et de générer un rapport. Utile pour savoir dans quelle mesure un projet est prêt à utiliser des outils d'IA.
acreadiness-generate-instructions
40kAide votre agent à rédiger des instructions pour les outils d'IA à partir d'une évaluation, afin d'améliorer leur travail sur le code et combler les lacunes.
acreadiness-policy
40kPermet à votre agent d'aider à définir ou appliquer des politiques d'évaluation des projets d'IA. Utile pour standardiser les évaluations et garantir la conformité.
Skills similaires
openclaw-update
394kAide votre agent à mettre à jour une passerelle OpenClaw existante, en choisissant la méthode adaptée à son installation et en gardant votre session active.
diagnose-gateway
394kAide votre agent à trouver pourquoi votre passerelle OpenClaw échoue, en vérifiant les paramètres, les canaux et les ports sans rien modifier.
crabbox-apps
394kAide votre agent à ouvrir et exécuter une application sur une machine cloud temporaire, puis à afficher sa vue dans le panneau latéral de votre chat.