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.
- Autor
- heyAyushh ↗
- Repozytorium
- stacc ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 21.09.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 21.09.2026, bez odwołań do wycofanych modeli i API.
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
- Arguments
- Steps
- Handling Conflicts
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
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · heyAyushh/stacc | 100 | MIT |
| tony/skills | 100 | MIT |
| tony/skills | 100 | MIT |
| jl-cmd-projects/claude-dev-env | 100 | MIT |
| verygoodopensource/vgv-wingspan | 100 | MIT |
| opsmill/infrahub | 100 | Apache-2.0 |
| bengous/claude-code-plugins | 100 | MIT |
| jeffh/claude-plugins | 100 | Apache-2.0 |
| heyAyushh/stacc | 100 | MIT |
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.