How branches let you work in isolation, the ways Git rejoins divergent history, and how to resolve the conflicts that arise when both sides moved.
5 topics
Branching is where Git stops being a fancy save button and becomes a way for several lines of work to proceed at once. Because a branch is just a movable pointer, the act of diverging is nearly free — the real work, and the real skill, is in rejoining. This chapter covers the integration commands and the failure modes that come with them.
The four ways to bring history back together — fast-forward and three-way merges, rebasing, and cherry-picking — each make a different tradeoff between a clean graph and a faithful record. Two ideas thread through all of them: that "ours" and "theirs" invert between merge and rebase, and that you must never rewrite history others have already pulled.
Integrate by intent
Combine a finished branch, keep its history→merge
Update your branch to a linear history (local only)→rebase