VOOZH about

URL: https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github?comment=67184

โ‡ฑ How To Create a Pull Request on GitHub | DigitalOcean


How To Create a Pull Request on GitHub

Updated on March 10, 2022
๐Ÿ‘ How To Create a Pull Request on GitHub

Introduction

Git is an open-source distributed version control system that makes collaborative software projects more manageable. Many projects maintain their files in a Git repository, and platforms like GitHub have made sharing and contributing to code accessible, valuable, and effective.

Open-source projects that are hosted in public repositories benefit from contributions made by the broader developer community through pull requests, which request that a project accept changes you have made to its code repository.

This tutorial will guide you through making a pull request to a Git repository through the command line so that you can contribute to open-source software projects.

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

Tutorial Series: Introduction to GitHub and Open-Source Projects

Open-source projects that are hosted in public repositories benefit from contributions made by the broader developer community, and are typically managed through Git. This tutorial series will guide you through selecting an open-source project to contribute to, making a pull request to a Git repository through the command line, and taking steps to follow up on your pull request.

About the author

Community and Developer Education expert. Former Senior Manager, Community at DigitalOcean. Focused on topics including Ubuntu 22.04, Ubuntu 20.04, Python, Django, and more.

Still looking for an answer?

Was this helpful?

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Hi! This tutorial promises to โ€œguide you through making a pull request to a Git repository through the command lineโ€, but the PR is done through the UI . . .

Hi,

Nice explanation and I have one doubt.

You have created new branch called new-branch from your forked repo and you started your development activity on โ€œnew-branchโ€ branch, after completion of your activity pushed it to GitHub, so now you have two branched one is master and new-branch. I havenโ€™t seen step saying about merging new-branch changes.

Wonderful Guide! Thanks so much for writing!

Hey, great guide.

I do have one question though. So, we forked the open-source-repo into our master. Then, we branched our master and created branch-feature, made changes to it. After that, to sync our master branch with the open-source-repo, we fetched and merged into our own master. But in the end, we made a pull request from the branch-feature in our repo. Not from the master branch, which is the one kept in sync with the open-source-repo. So, am I missing some step there? It seems to me that once we send the PR from the new branch, it could still be out of sync with the open-source-repo right?

Thank you SO much for this guide! Iโ€™m learning a lot from the comments as well!

All is right! Thanks for help me to contribute to another libre software project, I am waiting for pull request approval; thanks again.

Great tutorial, very well put together. I have one question. Why not just clone and work from the original repo?

Hi Lisa, Itโ€™s a good tutorial but the line git commit -m "Fixed documentation typos The commit message is not good, it should be an imperative language. Like Fix documentation typos.

Before I give my suggestion, wonderful guide! Amazing work!

Some of the newest versions of Git, theyโ€™ve introduced a new command to deal with branches navigation, wich is git-switch command. It would be nice to see this guide with this update too!

๐Ÿ‘ Creative Commons
This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.
  • Deploy on DigitalOcean

    Click below to sign up for DigitalOcean's virtual machines, Databases, and AIML products.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and AI-native businesses

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOceanโ€™s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow โ€” whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

ยฉ 2026 DigitalOcean, LLC.Sitemap.
Dark mode is coming soon.