Git from Scratch

Цикл про Git для работы в команде: снимки и коммиты, ветки и слияние, push/pull, pull request и код-ревью, rebase, спасение через reflog и модели ветвления.

Git is a developer's natural habitat: the code lives in it, tasks are closed through it, reviews happen in it. This series is eight articles from the first commit to team branching models — not a command reference but an explanation of the mechanism, after which the commands stop being incantations.

Eight articles go in order — each builds on the previous ones:

  1. What Git is — snapshots, the three file states, local and remote repositories.
  2. Commits and history — atomic commits, messages, log/diff/blame, .gitignore.
  3. Branches and merging — the branch as a pointer, fast-forward versus merge commit, conflicts without panic.
  4. Push, pull, fetch — origin, tracking branches, the rejected push, and when force is legitimate.
  5. Pull requests and code review — shaping a PR, surviving review, merge/squash/rebase merging.
  6. Rebase and cherry-pick — straight history, cleanup before review, the golden rule.
  7. Undo and recovery — restore, stash, reset versus revert, and reflog as a time machine.
  8. Branching models — Git Flow, GitHub Flow, trunk-based: comparison and choice.

The series is a phase in every backend program (Java, Python, Go, Node) and stands on its own for any profile: Git is equally needed by a tester, a frontend developer, and an analyst. The automation side continues in the CI/CD section.