Safe line rebase

VerifiedSafe

Safely pick up changes from the terminal station branch onto the watched branch using secure rebase. Protects work-in-progress with stashing and prevents assembly line retriggering.

Sby Skills Guide Bot
DevelopmentIntermediate
306/2/2026
Claude Code
#git-rebase#line-rebase#wip-stashing#workflow-automation

Recommended for

Our review

This skill safely picks up changes from the terminal station branch onto the watched branch using a stash and rebase sequence.

Strengths

  • Preserves work-in-progress via automatic stashing
  • Avoids redundant assembly line triggers
  • Fast and automated single-operation sequence

Limitations

  • Does not automatically resolve rebase conflicts
  • Requires the line/stn/ branches to exist
  • Relies on [skip line] markers in station commits
When to use it

Use this skill when the status line indicates there are commits ready on the terminal station branch to be picked up.

When not to use it

Do not use it if rebase conflicts are expected or if you prefer a merge instead of a rebase.

Security analysis

Safe
Quality score90/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.

No concerns found

Examples

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
Related skills