Git branches, merges and pull requests, hands-on

11 steps · about 3 h 50 min · Beginner

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. 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.

  11. 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.