01 - Git Interactive Rebase: Cleaning Up Commit History
Squash, reorder, fix and split commits with git rebase -i, every step tried on a test repository, and how to recover your work with the reflog.
Advanced Git guide: branching strategies, interactive rebase, stash, reflog, bisect, and collaborative workflows. Professional techniques for managing complex repositories and distributed teams.
This series collects 13 articles (approximately 152 minutes of total reading time), designed for a level Intermediate. The main topics covered are Git, version control, branching, rebase.
Squash, reorder, fix and split commits with git rebase -i, every step tried on a test repository, and how to recover your work with the reflog.
Git Flow with main, develop, feature, release and hotfix: the Git commands run one by one, the graph they produce and the projects it does not suit.
Merge and rebase leave different histories: what stays in the repository after each, how many conflicts you meet and what a rebase of published commits breaks.
Bring a single commit onto another branch with cherry-pick and share it as a patch with format-patch and am: conflicts, order and limits, all tried for real.
Set work aside with stash, recover lost commits with the reflog, find a regression with bisect and work on two branches at once with worktree.
Set up Git hooks with Husky, lint-staged and commitlint to block problems before the commit, and learn why CI must repeat the same checks.
Two edits to the same line stop the merge: how to read the markers, see the base with diff3, cancel with --abort and reuse your fix with rerere.
Split an afternoon of edits into commits you can undo one at a time, with a title, body and footer that explain why.
A pull request is reviewed with four questions: scope, tests, names and side effects. Each has a Git command, tried on a test repository with real output.
Lightweight and annotated tags are not the same: what each stores, why git describe ignores one of them, and how to number releases with SemVer.
When did a line appear and who touched it last? How to find out with git log -S, -G and git blame -L, and why the three do not answer the same way.
A submodule stores a pointer to a commit, a subtree copies the files into your history: what changes in the clone, the push and the commit count.
An SSH signature can be correct and still untrusted: set up signed commits, read the G, U and N letters and write the allowed_signers file.
Have you read all the articles? Check how much you've learned by taking this series' quizzes.