Skip to main content

Advanced Git

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.

13Articles152 minTotal reading timeIntermediateLevel
Gitversion controlbranchingrebaseworkflow

Series Articles

  1. 1

    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.

  2. 2

    02 - Git Flow: Professional Branching Workflow

    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.

  3. 3

    03 - Git Rebase vs Merge: When to Use What

    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.

  4. 4

    04 - Git Cherry-Pick and Patch: Surgical Commit Selection

    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.

  5. 5

    05 - Git Advanced Commands: Stash, Reflog and Bisect

    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.

  6. 6

    06 - Git Hooks and Automation: Automatic Quality Gates

    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.

  7. 7

    07 - Git Merge Conflicts: Reading the Markers and Closing Them Properly

    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.

  8. 8

    08 - Atomic Commits and Messages You Can Still Read in a Year

    Split an afternoon of edits into commits you can undo one at a time, with a title, body and footer that explain why.

  9. 9

    09 - Reviewing a pull request: what to look at in the diff

    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.

  10. 10

    10 - Git Tag: A Name for Every Release, with Annotated Tags and SemVer

    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.

  11. 11

    11 - Git log -S, -G and blame: Find the Commit That Introduced a Line

    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.

  12. 12

    12 - Git Submodules and Subtree: Two Ways to Include a Repository

    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.

  13. 13

    13 - Signing Git Commits with an SSH Key, and Really Verifying Them

    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.

Test your knowledge!

Have you read all the articles? Check how much you've learned by taking this series' quizzes.

Take the quiz!