Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

rebase

/rebase

Przenosi bieżącą gałąź na wybrany cel, na przykład main, inną gałąź lub gałąź zdalną, i obsługuje konflikty z uwzględnieniem kontekstu.

Repozytorium
stacc ↗
Licencja
MIT
Ostatnia zmiana repozytorium
21.09.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 21.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Przenosi bieżącą gałąź na wybrany cel, na przykład main, inną gałąź lub gałąź zdalną, i obsługuje konflikty z uwzględnieniem kontekstu.

Oryginalny opis (EN)

Rebase the current branch with flexible target options. Use when you need to rebase on main, a specific branch, or a remote branch, with intelligent conflict handling.

Jak działa

  1. Arguments
  2. Steps
  3. Handling Conflicts
Sekcje z nagłówków SKILL.md, w oryginale · 58 linii, 366 słów
Podgląd SKILL.md
---
name: rebase
description: Rebase the current branch with flexible target options. Use when you need to rebase on main, a specific branch, or a remote branch, with intelligent conflict handling.
---

# Rebase

Rebase the current branch.

## Arguments

- No arguments: rebase on local main
- `origin`: fetch origin, rebase on origin/main
- `<remote>/<branch>`: when `<remote>` is an existing Git remote, fetch it and rebase on that remote-tracking branch
- `branch`: rebase on local branch

## Steps

1. **Preflight the current branch**
   - Confirm this is a Git worktree and identify the current branch with `git branch --show-current`; stop for a detached `HEAD` unless the user explicitly chose it.
   - Run `git status --porcelain`; if it is not empty, stop and ask the user to commit, stash, or discard the changes. Do not stash or discard work automatically.
   - If the branch has an upstream, report its ahead/behind count with `git rev-list --left-right --count @{upstream}...HEAD`. Treat it as potentially published or shared and get explicit confirmation that rewriting and any required force-push are acceptable. If it has no upstream, state that publication cannot be determined.

2. **Resolve the target**
   - No args → target is `main`; verify it resolves to a commit.
   - Just `origin` → verify `origin` is a configured remote, fetch it, then target `origin/main`.
   - For another argument containing `/`, inspect its first path component with `git remote`. Fetch and use it as `<remote>/<branch>` only when that component is an existing remote; otherwise treat the whole argument as a local ref (for example, `feature/login`).
   - Verify the chosen target with `git rev-parse --verify <target>^{commit}` before rebasing.

3. **Fetch if needed**
   ```bash
   git fetch <remote>
   ```

4. **Rebase**
   ```bash
   git rebase <target>
   ```

5. **Handle conflicts** (if any)

6. **Continue until complete**

## Handling Conflicts

- BEFORE resolving any conflict, understand changes made to each conflicting file in the target branch
- For each conflicting file:
  ```bash
  git log -p -n 3 <target> -- <file>
  ```
- Determine the intended behavior from both changes, tests, and project conventions. Keep the correct behavior; do not mechanically preserve both edits when they conflict.
- After resolving each conflict:
  ```bash
  git add <file>
  git rebase --continue
  ```
- If a conflict is too complex or unclear, ask for guidance before proceeding
- At any point before completion, recover the pre-rebase state with:
  ```bash
  git rebase --abort
  ```

Wersje

RepozytoriumWynikLicencja
Ta strona · heyAyushh/stacc100MIT
tony/skills100MIT
tony/skills100MIT
jl-cmd-projects/claude-dev-env100MIT
verygoodopensource/vgv-wingspan100MIT
opsmill/infrahub100Apache-2.0
bengous/claude-code-plugins100MIT
jeffh/claude-plugins100Apache-2.0
heyAyushh/stacc100MIT

Migawka bazy z 13.11.2026 · wersja paczki 532effef1685 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 1 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90rebase-main
    Aktualizuje lokalne main i przenosi bieżącą gałąź na nią, rozwiązując konflikty bez utraty lokalnych zmian.
  • 90rebase-pr
    Przenosi gałąź pull requesta na main, rozwiązuje konflikty, uruchamia lintery i wykonuje force push.
  • 100rebase-current-branch
    Wykonuje rebase bieżącej gałęzi funkcji na najnowszą domyślną gałąź (main lub master), wykrywając, której używa repozytorium, i prowadząc przez bezpieczne rozwiązywanie konfliktów.
  • 100rebase-origin-main
    Przenosi bieżącą gałąź na origin/main i pomaga rozwiązać konflikty scaleń napotkane po drodze.
  • 100rebase-latest-main
    Pobiera najnowsze origin/main i stosuje je do bieżącej gałęzi przez rebase, rozwiązując konflikty, gdy trzeba zsynchronizować gałąź z upstreamem.
  • 100git-branch-sync
    Pobiera najnowszą gałąź bazową i wykonuje rebase bieżącej gałęzi, czytelnie pokazując konflikty, gdy gałąź jest nieaktualna względem bazy.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.