Przejdź do treści
Biblioteka skilli
Programowanie · Nauka i wyjaśnianie

git-workflow

/git-workflow

Pomaga w pracy z git poza samym komunikatem commita: gałęzie, rebase kontra merge, konflikty, odzyskiwanie utraconej pracy i bisect, z uwagą na to, co jest bezpieczne na wspólnych gałęziach.

Repozytorium
md-files ↗
Licencja
MIT
Ostatnia zmiana repozytorium
03.10.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 03.10.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

Pomaga w pracy z git poza samym komunikatem commita: gałęzie, rebase kontra merge, konflikty, odzyskiwanie utraconej pracy i bisect, z uwagą na to, co jest bezpieczne na wspólnych gałęziach.

Oryginalny opis (EN)

Use when working with git beyond writing a commit message — branching, rebasing vs merging, resolving conflicts, recovering lost work, and bisecting to find a bad commit. Covers what is safe on shared branches and what is not.

Jak działa

  1. Branching
  2. Rebase vs. merge — the one rule that matters
  3. Resolving conflicts
  4. Recovery — git rarely loses committed work
  5. Finding a bad commit
  6. Don't
Sekcje z nagłówków SKILL.md, w oryginale · 67 linii, 472 słów
Podgląd SKILL.md
---
name: git-workflow
description: >-
  Use when working with git beyond writing a commit message — branching, rebasing
  vs merging, resolving conflicts, recovering lost work, and bisecting to find a bad
  commit. Covers what is safe on shared branches and what is not.
---

# Git Workflow

Git is a content-addressable history you can almost always recover from. The rules below
keep history readable and keep you out of the irreversible corners.

## Branching

- Branch per unit of work off the latest base. Keep branches short-lived — long-lived
  branches drift and conflict.
- Rebase your *own* unpushed branch onto the updated base to keep a linear history before
  opening a PR: `git fetch && git rebase origin/main`.
- For an explicitly owned stacked-PR branch, rebasing after publication can be part of the
  documented workflow. Fetch first, save recovery refs, inspect active review, restack
  descendants bottom-up, and push only with `--force-with-lease`. Use the
  `stacked-changes` skill for the full protocol.

## Rebase vs. merge — the one rule that matters

- **Rebase private history or explicitly owned stack branches.** Never rewrite a branch
  others may have based work on unless that repository's stack workflow establishes
  ownership and recovery. A pushed stack is not automatically shared, but ownership must
  be known and `--force-with-lease` is mandatory.
- **Merge to integrate shared branches.** A merge commit is honest about when integration
  happened and is safe for history others already have.

## Resolving conflicts

- Read both sides before editing — understand what each change intended, don't just pick
  one. The conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`) bound the competing hunks.
- After resolving: `git add` the files, then continue (`git rebase --continue` /
  `git merge --continue`). Run the tests before finishing — a clean merge can still be
  semantically broken.
- Bail out safely if it's a mess: `git rebase --abort` / `git merge --abort` returns you
  to the pre-operation state.

## Recovery — git rarely loses committed work

- **`git reflog`** is the undo log for HEAD. Reset to the wrong place, botched a rebase,
  "lost" a branch? The prior HEAD is in the reflog: `git reset --hard HEAD@{1}`.
- **`git revert <sha>`** undoes a commit by adding an inverse commit — the safe way to
  undo something already pushed (vs. `reset`, which rewrites history).
- Uncommitted changes are the real loss risk — `git stash` before risky operations.

## Finding a bad commit

`git bisect` binary-searches history for the commit that introduced a bug:

```text
git bisect start
git bisect bad                 # current commit is broken
git bisect good <known-good>   # this older commit worked
# git checks out the midpoint — test it, then:
git bisect good   # or: git bisect bad
# repeat until git names the first bad commit, then:
git bisect reset
```

Automate it with `git bisect run <test-command>` when the test is scriptable.

## Don't

Force-push to `main`/`master`/`shared` branches. Rewrite pushed history others build on.
Bypass a rejected `--force-with-lease` with `--force`. `git reset --hard` with uncommitted
changes you care about. `git clean -fd` without checking what it'll delete first
(`git clean -nd` previews).

Wersje

RepozytoriumWynikLicencja
Ta strona · alisinadevelo/md-files100MIT
event4u-app/agent-config100MIT
lee-w/maigo100MIT
hakula139/plugins100MIT
ericrisco/rsc-harness100MIT
Sanit-mann/The-Insectoids100MIT
eliyce/paqad-ai100MIT
langfuse/langfuse100MIT
Muvon/octomind-tap100Apache-2.0

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

Pobrania w ostatnich 30 dniach: 0 · ranking

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

Podobne skille

  • 90Git Workflow
    Prowadzi pracę w modelu trunk-based w projekcie NXTG-Forge: gałęzie, komunikaty commitów, pull requesty, rebase i blokady push.
  • 100git-advanced
    Obsługuje złożone operacje Git: rebase, cherry-pick, konflikty scalania, bisect, stashe, czyszczenie historii i pracę z monorepo, wykraczając poza podstawowe commit, push i pull.
  • 100git
    Prowadzi przez operacje Git, takie jak commity, gałęzie, rebase i rozwiązywanie konfliktów scalania.
  • 100git
    Obsługuje wymagające przepływy Git: modele gałęzi, merge kontra rebase, interaktywny rebase, bisect, cherry-pick, worktrees i konwencje commitów.
  • 96resolving-merge-conflicts
    Rozwiązuje konflikty w trwającym merge lub rebase w git.
  • 96resolving-merge-conflicts
    Rozwiązuje konflikty w trwającym merge lub rebase w git.

Uwagi i zgłoszenia

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