MSK Institute LogoMSK.Institute
HomeCourses
Book Free Demo➔Sign In
Free Demo➔
MSK Institute LogoMSK.Institute

Leading computer training academy in Shikohabad for software engineering, Python, web development, and digital literacy.

ISO 9001:2015 Certified Center
Follow & Connect
4.9

Programs & Admissions

  • All CoursesCatalog
  • Learning PathsRoadmaps
  • Student ProjectsShowcase
  • Live Classes & ScheduleLive
  • Upcoming Batches
  • Campuses & LocationsHub
  • Verify Certificates
  • Book Free Demo Class

Resources & Tools

  • Free Online Mock TestsAll Tests
  • NIELIT CCC Mock TestFree
  • Course & Career FinderQuiz
  • Study Material Hub
  • All MSK ToolsHub
  • Keyboard ShortcutsNew
  • TypeQuest Speed LabTyping
  • MSK Code PlaygroundCode
  • Interactive Tutorials
  • Quick Cheatsheets

Institute & Contact

  • About MSK Institute
  • Careers & InternshipsHiring
  • Publications & Blogs
  • Gali No. 3, Near Gyan Jyoti Public School,
    Adarsh Nagar, Shikohabad, Uttar Pradesh 283135
  • +91 83930 42166
  • mskshikohabad@gmail.com
  • Hours:Mon – Sat: 8:00 AM – 7:00 PM | Sun: 10:00 AM – 2:00 PM
  • 4.9 ★(38 Google Reviews)
© 2026 MSK Institute. All rights reserved.•Privacy Policy•Terms of Service•Disclaimer•Contact Us

Shikohabad's Leading Computer & Coding Academy

Home
Courses
Live
Material
Creating and Managing Pull Requests (PRs) on GitHub0%
Study Materials
Git & GitHub BasicsProgress 0%
1.1What is Version Control? (Local, Centralized vs Distributed VCS)1.2Why Git? History, Architecture & Core Benefits1.3The Three Trees: Working Directory, Staging Area & Git Repository1.4Installing Git and Initial Configuration (git config user.name / email)
6.1Forking Repositories and Cloning to Local Machine (git clone)6.2Creating and Managing Pull Requests (PRs) on GitHub6.3Code Reviews, Inline Comments, Approvals and Changes Requested6.4Syncing Upstream Repositories and Keeping Forks Updated
HomeTutorialsGit & GitHub BasicsCreating and Managing Pull Requests (PRs) on GitHub
Code Reviews, Inline Comments, Approvals and Changes Requested

Creating and Managing Pull Requests (PRs) on GitHub

Beginner12 min read•Updated: 2026-09-15•By Er. Sumit Kumar (MSK Institute)
Study MaterialsCheatsheet

The Pull Request (PR) is the foundational collaboration workflow of modern software engineering. It is how developers propose changes, invite teammates to review code, run automated tests, and safely merge features into production.


1. What is a Pull Request?

A Pull Request is not a Git command—it is a feature popularized by GitHub. When you create a Pull Request, you are literally asking the maintainers:

"I have finished developing feature X on branch feature-auth. Would you please pull my commits into your main branch?"
1Your Branch: (C1) ---> (C2) [feature-auth]
2 |
3 [ Pull Request ]
4 |
5Target Branch: (C1) <---------------+ (main)

2. The Complete Pull Request Workflow

Professional software teams follow this 6-step PR cycle daily:

Step 1: Create a Focused Feature Branch

Never write code directly on main:

1git switch main
2git pull
3git switch -c feat-stripe-checkout

Step 2: Develop, Stage, and Commit

Write your code and create semantic commits:

1git add src/payments/stripe.js
2git commit -m "feat(payment): integrate Stripe checkout session API"

Step 3: Push the Branch to GitHub

1git push -u origin feat-stripe-checkout

Step 4: Open the Pull Request on GitHub

  1. 1
    Navigate to your repository on GitHub.
  2. 2
    A yellow notification banner will appear: "feat-stripe-checkout had recent pushes... Compare & pull request". Click it!
  3. 3
    Select the base branch (main) and the compare branch (feat-stripe-checkout).
  4. 4
    Write a descriptive Title and Description:
  • What problem does this solve?
  • What approach did you take?
  • How can the reviewer test it?
  1. 1
    Click Create pull request.

3. Writing an Exceptional PR Description

A high quality PR description accelerates code reviews and prevents misunderstandings. Industry-standard PR template:

1## Summary
2Integrates Stripe checkout API to allow customers to pay for course subscriptions online.
3 
4## Changes Made
5- Added `stripe` npm dependency.
6- Implemented `/api/checkout` endpoint with Webhook signature verification.
7- Created checkout modal in `src/components/CheckoutModal.jsx`.
8 
9## How to Test
101. Run `npm install` and `npm run dev`.
112. Navigate to `/courses/python-for-beginners`.
123. Click "Enroll Now" and verify test card numbers succeed.
13 
14## Closes
15Closes #42
Pro Tip
[!TIP] Writing keywords like Closes #42 or Fixes #15 in your PR description tells GitHub to automatically close the associated issue when the PR is merged!

4. Merging Options on GitHub

When a PR is approved by reviewers and passes all CI/CD checks, maintainers have three merge strategies available:

1[ Merge pull request ] v
2--------------------------
31. Create a merge commit : Creates a 3-way merge commit preserving all commits and branch context.
42. Squash and merge : Combines all commits into a single clean commit on main (keeps main history spotless!).
53. Rebase and merge : Re-applies commits linearly without a merge commit.

Interactive Quiz• Knowledge Check

Practice Quiz

Question 1
What is the primary purpose of a Pull Request (PR) on GitHub?
Question 2
When creating a Pull Request, what is the "base" branch?
Question 3
What happens when you include the phrase Fixes #104 in a GitHub Pull Request description?
Question 4
What does the "Squash and merge" option do when merging a Pull Request?
Question 5
What is a "Draft Pull Request" on GitHub?
Next Lesson

Code Reviews, Inline Comments, Approvals and Changes Requested

Continue learning with hands-on practice, examples, and exercises in the upcoming topic.

Related Lessons

Previous LessonNext Lesson
Forking Repositories and Cloning to Local Machine (git clone)Code Reviews, Inline Comments, Approvals and Changes Requested

Practice Quiz

Test your understanding of this lesson with 5 questions. Each question has one correct answer.

Mentor-Led Practical Training

Master Git & GitHub Basics with Hands-On Projects

Practice in live mentor-led sessions with real projects, mock tests, and verifiable certification at MSK Institute.

View Full CourseBook Free Demo
PreviousNext
PreviousPrevNext