Git branches, merges and pull requests, hands-on
11 steps · about 3 h 50 min · Beginner
- Branching and merging — Introduction to version control with Git (guide, CodeRefinery, 25 min)
Start with a short, hands-on exercise that creates two branches and merges them, so the idea of diverging history makes sense first.
- Git - Basic Branching and Merging (doc, Pro Git (git-scm.com), 25 min)
The official book explains fast-forward merges, three-way merges and conflict markers, which gives you the model behind the commands.
- Learn Git Branching (interactive, Peter Cottle, 1 h)
A visual sandbox shows the commit graph changing as you branch and merge, which makes the commands stick.
- About pull requests (doc, GitHub Docs, 10 min)
Once local branches make sense, this page shows how GitHub turns a branch merge into a proposal that others can review.
- Quickstart for pull requests (tutorial, GitHub Docs, 20 min)
You do the full loop once: branch, commit, open a pull request, respond to feedback and merge.
- Creating a pull request (doc, GitHub Docs, 10 min)
This covers the details of opening a pull request, including draft pull requests and the web, Desktop and CLI routes.
- Resolve merge conflicts (interactive, GitHub Skills, 30 min)
A free, guided course in your own repo where you create a conflict and resolve it in a pull request.
- Git rebase (guide, Atlassian Git Tutorial, 20 min)
Rebase is the other way to integrate branches. Read this after you are comfortable with merge so the trade-offs are clear.
- Git team workflows: merge or rebase? (article, Inside Atlassian, 15 min)
It shows how teams choose between merge and rebase policies, which is the decision you face in real pull request workflows.
- Pull requests (reference, GitHub Docs, 10 min)
A reference to return to for draft pull requests, the fork and pull model, and how pull request refs work.
- Git - Branching and Merging (reference, Pro Git (git-scm.com), 5 min)
A compact command reference that points back to the book chapters on each branch and merge command.