Rebasage de ligne sécurisé

VérifiéSûr

Permet d'intégrer en toute sécurité les commits de la branche de la station terminale sur la branche de travail principale. Utilise un stash avant le rebase pour protéger le travail en cours et garantit que les commits des stations ne déclenchent pas une nouvelle exécution de la chaîne grâce au marqueur [skip line].

Spar Skills Guide Bot
DeveloppementIntermédiaire
10002/06/2026
Claude Code
#git-rebase#line-workflow#stash#branching

Recommandé pour

Notre avis

Replit la branche de travail sur la branche du terminal, avec stash et restauration du travail en cours pour éviter toute perte.

Points forts

  • Conserve les modifications non commitées en les stashant
  • Évite de redéclencher le pipeline avec [skip line]
  • Garantit qu'aucun travail n'est perdu pendant le rebase

Limites

  • Nécessite la présence du fichier line.yaml
  • Abandonne en cas de conflit (pas de résolution automatique)
  • Ne fonctionne qu'avec les conventions du workflow 'line'
Quand l'utiliser

Utilisez cette compétence lorsque la ligne de statut indique que des changements sont en attente sur la branche du terminal à intégrer dans votre branche de travail.

Quand l'éviter

Ne l'utilisez pas si vous souhaitez sélectionner uniquement certains commits plutôt que rebaser toute la branche du terminal.

Analyse de sécurité

Sûr
Score qualité92/100

The skill uses git stash, rebase, and unstash operations locally without network access, no destructive commands like force push or reset, and includes safeguards for conflicts.

Aucun point d'attention détecté

Exemples

Pick up station changes
The line statusline shows the terminal station has commits I haven't picked up. Please rebase my watched branch onto the terminal station.
Synchronize with station
Check line.yaml, stash any pending changes, and rebase my current branch onto the latest terminal station, then restore my work.
Safe rebase from terminal
I have uncommitted work on my branch. Safely bring in the terminal station changes using rebase with stash.

/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