Rebasage de ligne sécurisé

VérifiéSûr

Récupère les modifications de la branche terminus sur la branche surveillée via un rebasage sécurisé. Utilise le stashing pour protéger le travail en cours et évite de retrigger l'assembly line.

Spar Skills Guide Bot
DeveloppementIntermédiaire
2002/06/2026
Claude Code
#git-rebase#line-rebase#wip-stashing#workflow-automation

Recommandé pour

Notre avis

Cette compétence permet de récupérer en toute sécurité les modifications de la branche de la station terminale vers la branche surveillée en utilisant un rebase et un stash.

Points forts

  • Préserve le travail en cours grâce au stash automatique
  • Évite les déclenchements redondants de la chaîne d'assemblage
  • Opération rapide et automatisée en une seule séquence

Limites

  • Ne gère pas les conflits de rebase automatiquement
  • Nécessite que les branches line/stn/ existent
  • Dépend de la présence du marqueur [skip line] dans les commits
Quand l'utiliser

Utilisez cette compétence lorsque la ligne de statut indique que des commits sont prêts sur la branche de la station terminale à récupérer.

Quand l'éviter

Ne l'utilisez pas si des conflits de rebase sont prévisibles ou si vous préférez un merge plutôt qu'un rebase.

Analyse de sécurité

Sûr
Score qualité90/100

The skill performs only local git operations (stash, rebase, stash pop) on known branches, with no network calls, destructive commands, or handling of secrets. There is a minor potential for command injection via the branch name read from a YAML file, but this is within a controlled environment and typical of configuration-driven workflows.

Aucun point d'attention détecté

Exemples

Rebase from terminal station
Run a line rebase to pick up changes from the terminal station onto the watched branch.
Check and rebase
Check if there are new commits on the terminal station branch and if so, rebase them onto my working branch.

/line-rebase

Safely pick up changes from the terminal station branch onto the watched branch.

When to use

Use this skill when the line statusline indicates there are commits ready on the terminal station branch that haven't been picked up on the main working branch.

Procedure

  1. Identify branches: Read line.yaml to determine the watched branch and the terminal (last) station.

  2. Check for changes: Verify the terminal station branch (line/stn/<terminal>) has commits ahead of the watched branch.

  3. Stash current work: If there are any uncommitted changes on the watched branch, stash them:

    git stash push -m "line-rebase: stashing WIP"
    
  4. Rebase from terminal station: Rebase the watched branch to include the terminal station's changes. All station commits contain [skip line] markers, so they will NOT retrigger the assembly line (SKL-2):

    git rebase line/stn/<terminal>
    
  5. Restore work in progress: If changes were stashed in step 3, restore them:

    git stash pop
    
  6. Verify: Confirm the watched branch now includes the station improvements and any WIP is restored.

Safety guarantees

  • No work is ever lost: WIP is always stashed before any branch operations
  • No retriggering: Station commits contain [skip line] which prevents line run from retriggering (RUN-9, SKL-2)
  • Fast and automatic: The entire operation is a stash, rebase, unstash sequence

Important

  • NEVER force-push or reset any branches
  • ALWAYS stash before rebase, even if the working tree appears clean
  • If the rebase has conflicts, abort and inform the user rather than auto-resolving
  • Verify the stash was applied successfully after the rebase
Skills similaires