← All exercises
Exercise 02 / 10

Your First Pull Request

The complete open-source workflow in one exercise

Duration30–45 minutes
DifficultyBeginner
PrerequisitesExercise 01 — a working terminal, Git, and GitHub CLI.
Your First Pull Request
Fig. 02Hands-On Guide
Introduction

Overview

This chapter is a hands-on exercise. By the end of it, you'll have forked a real repository, created a branch, written a review of a book chapter, and submitted a pull request — the standard way open-source contributors propose changes.

This isn't a simulation. Your pull request will show up on GitHub for real people to read.

This is the open-source workflow. Every contribution to every major project in the world follows these same seven steps. You'll have done all of them by the end of this chapter.

— from the exercise
What you'll build

By the end of this exercise.

  • Your own fork of The Agentic Crew repository on GitHub
  • A new branch with your changes isolated from main
  • A written review of a book chapter (your words, your opinions)
  • A staged change you read with git diff --staged before committing it
  • A pull request submitted to the original project — visible to real people
  • Optional: the same flow driven by an agent, from a plan you approved first
Key concepts

Terms you'll learn.

Repository
A project folder that Git is tracking — often called a "repo"
Fork
Your personal copy of someone else's repository, stored on GitHub
Branch
A parallel version of the project where you work without touching the main copy
Commit
A saved snapshot of your changes, with a message describing what you did
Diff
Exactly which lines you added or removed — read it before every commit
Pull Request
A formal request to merge your branch into the original project
Instruction file
CLAUDE.md or AGENTS.md — notes about the project that an agent reads when it starts
Untrusted input
Text you didn't write, which can contain instructions aimed at the agent
What's covered

Sections in this exercise.

  1. 01What You'll Need
  2. 02What's About to Happen
  3. 03Fork and Clone the Book
  4. 04Explore the Project
  5. 05Read Chapter 1
  6. 06Create a Branch
  7. 07Write Your Review
  8. 08The Prompt-First Way
  9. 09Stage and Commit
  10. 10Push to Your Fork
  11. 11Create the Pull Request
  12. 12What Happens Next
What just happened

You've just completed the workflow that powers every major open-source project in the world — fork, clone, branch, write, commit, push, pull request. You read your diff before committing, and if you let an agent drive, you approved its plan first. You'll use these habits for the rest of this book.