0Pricing
DevOps Bootcamp · Lesson

Creating & Reviewing Pull Requests

Learn the lifecycle of a pull request, from creation to review, approval, and merging on GitHub.

Creating & Reviewing Pull Requests is a free DevOps Bootcamp lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

What Are Pull Requests?

Pull Requests (PRs) are at the heart of collaborative development on platforms like GitHub. They are a way to propose changes to a project and have them reviewed before being integrated.

Think of a PR as a formal request to merge your new code into a main branch, usually main or develop.

Why Use Pull Requests?

PRs offer several key benefits for teams and solo developers:

  • Code Review: Others can review your code for bugs, best practices, and improvements.
  • Discussion: They provide a dedicated space for discussing changes.
  • Quality Control: Ensures only approved, tested code makes it into the main project.
  • Change Tracking: A clear history of who changed what and why.

The PR Workflow: Overview

The typical Pull Request workflow involves these steps:

  1. Create a new branch for your feature or fix.
  2. Make changes and commit them to your new branch.
  3. Push your branch to GitHub.
  4. Open a Pull Request on GitHub.
  5. Reviewers provide feedback and approve.
  6. Merge your changes into the main branch.

Step 1: Create a Feature Branch

Before making any changes, it's best practice to create a new branch. This keeps your work isolated from the main project until it's ready.

Use git checkout -b to create and switch to a new branch:

git checkout main
git pull origin main
git checkout -b my-new-feature

Step 2: Commit Your Changes

Now, make the necessary code changes for your feature or bug fix. Once done, stage and commit them to your new branch, just like any other Git commit.

# Edit files, e.g., README.md
git add README.md
git commit -m "feat: Add new user profile section"

Step 3: Push Your Branch

After committing your changes locally, push your new branch to your remote repository on GitHub. This makes your branch and its commits visible online.

The -u flag sets the upstream branch, so future git push commands are simpler.

git push -u origin my-new-feature

Step 4: Open a Pull Request

Once your branch is pushed, GitHub will usually prompt you to create a Pull Request directly from your repository's page or the 'Pull requests' tab.

  • Select your feature branch as the head (source).
  • Select the main (or target) branch as the base.
  • Add a clear title and description explaining your changes.

Step 5: Reviewing the Pull Request

After opening, your PR enters the review phase. Team members (reviewers) will examine your code, ask questions, or suggest improvements.

  • Conversation tab: Discussions and comments.
  • Files changed tab: See the exact code differences (diff).
  • Commits tab: View individual commits in the PR.

Step 6: Feedback & Approvals

Reviewers can leave comments directly on lines of code or provide general feedback. They can then:

  • Approve: The code is good to go.
  • Request changes: More work is needed before merging.
  • Comment: General feedback without blocking the merge.

You might need to make more commits to your feature branch based on feedback.

Step 7: Merging Your PR

Once approved, your PR can be merged into the base branch. GitHub offers a few merge options:

  • Merge commit: Preserves all commits from the feature branch.
  • Squash and merge: Combines all commits into one new commit.
  • Rebase and merge: Replays feature branch commits on top of the base branch.

The chosen method impacts your project's commit history.

Quick Check: PR Basics

You've just learned the core steps of creating and managing Pull Requests. Let's test your understanding!

Recap: Pull Request Power

Pull Requests are fundamental for modern team collaboration. You've learned how to:

  • Create a new branch for your work.
  • Push your branch to GitHub.
  • Initiate a Pull Request.
  • Understand the review and approval process.
  • Merge your changes into the main project.

Mastering PRs is key to contributing effectively to any Git-based project!

Frequently asked questions

Is the “Creating & Reviewing Pull Requests” lesson free?

Yes — the full text of “Creating & Reviewing Pull Requests” is free to read here on the web, and the DevOps Bootcamp course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the DevOps Bootcamp course, upgrade to CoddyKit PRO.

What will I learn in “Creating & Reviewing Pull Requests”?

Learn the lifecycle of a pull request, from creation to review, approval, and merging on GitHub. You practise DevOps Bootcamp with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start DevOps Bootcamp?

No prior experience is required. DevOps Bootcamp on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Creating & Reviewing Pull Requests” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this DevOps Bootcamp lesson?

Yes. Every DevOps Bootcamp lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Creating & Reviewing Pull Requests
  2. Forking Workflows on GitHub
  3. Code Reviews & Approvals
  4. Draft PRs and Pull Request Templates
← Back to DevOps Bootcamp