---
title: "Contributing to GitHub Projects (Git Pull Request for Dummies)"
description: "Learn how to contribute to GitHub projects by issuing Git pull requests to work with GitHub repo owners in this step-by-step article."
canonical: "https://adamtheautomator.com/git-pull-request/"
---

# Contributing to GitHub Projects (Git Pull Request for Dummies)

> Learn how to contribute to GitHub projects by issuing Git pull requests to work with GitHub repo owners in this step-by-step article.

Source: https://adamtheautomator.com/git-pull-request/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Contributing to GitHub Projects (Git Pull Request for Dummies)](https://adamtheautomator.com/wp-content/uploads/2021/04/Contributing-to-GitHub-Projects-Git-Pull-Requests-for-Dummies.jpg)

# Contributing to GitHub Projects (Git Pull Request for Dummies)

[![](https://secure.gravatar.com/avatar/c14b031fe4a12b0e3f4d1e112e37261df83921ddc370cdafbad2a614e36f0cf4?s=192&d=mm&r=g)Chaitanya](https://adamtheautomator.com/author/chaitanya-g/)21 April 20216 min. read

Categories: [DevOps](/category/devops/)

Tags:[Git](/tag/git/)[GitHub](/tag/github/)

Table of Contents

*   [Contributing to a GitHub Project](#h-contributing-to-a-github-project)
*   [What is a Pull Request?](#h-what-is-a-pull-request)
*   [Prerequisites](#h-prerequisites)
*   [Forking the GitHub Repo](#h-forking-the-github-repo)
*   [Committing New Code to Your Personal Fork](#h-committing-new-code-to-your-personal-fork)
*   [Committing Code via github.com](#h-committing-code-via-github-com)
*   [Committing Code via Git](#h-committing-code-via-git)
*   [Cloning](#h-cloning)
*   [Committing and Pushing Local Files](#h-committing-and-pushing-local-files)
*   [Submitting a Pull Request](#h-submitting-a-pull-request)
*   [Reviewing and Accepting a Pull Request](#h-reviewing-and-accepting-a-pull-request)
*   [Conclusion](#h-conclusion)

So you’ve come across a project in [GitHub](https://github.com) and you’d like to contribute to that project. But how? You don’t consider yourself a developer and source control terminology is foreign to you. No worries. The answer is a Git pull request (PR).

Not a reader? Watch this related video tutorial!

**_Not seeing the video? Make sure your ad blocker is disabled._**

In this tutorial, you will learn how to contribute to a GitHub project with a Git pull request to get your code into a [GitHub repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories) (repo).

## Contributing to a GitHub Project

By now, you’ve probably seen at least one GitHub project where you feel like you could help fix some bugs, update some documentation or add a new feature. You want to get involved but, like many other IT professionals, you don’t consider yourself a software developer.

Git and GitHub have traditionally been squarely in the development space. But with more and more infrastructure moving to the cloud and [Infrastructure as Code](https://adamtheautomator.com/infrastructure-as-code-iac/) tools coming about, sysadmins have been exploring more in GitHub.

Many IT pros don’t know where to start. So, in this article, you’re going to learn from square one how to contribute code to an existing GitHub project with pull requests.

## What is a Pull Request?

When you have a code/fix that will add more functionality or give more value to an existing project or repository in GitHub, you can create a pull request.

Even though a pull request is a single action, the end result (getting your code into someone else’s GitHub repo) involves five rough stages you’ll learn in this tutorial.

1\. [Forking](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) or “copying” the original repo to your GitHub account

> _The term “forking” is sometimes confused with the term “cloning”. Git and GitHub are two separate products. “Forking” is a GitHub term that creates a replica of a GitHub repo on GitHub. “[Cloning](https://git-scm.com/docs/git-clone)” is a Git term that refers to creating a local Git repo on your computer by downloading a remote Git repo._

2\. [Committing](https://www.atlassian.com/git/tutorials/saving-changes/git-commit) code to our personal forked repo and [pushing](https://github.com/git-guides/git-push) that code to the GitHub repo

3\. Submitting a pull request to the repo owner

4\. Repo owner reviewing and approving your changes in the pull request

5\. Repo owner merging your changes to the master branch

## Prerequisites

To follow along with the demonstrations in this tutorial, be sure you have the following:

*   A [GitHub account](https://github.com/join)
*   A GitHub repo to request changes to – This tutorial will use a repo called _[git-pull-requests](https://github.com/Adam-the-Automator/git-pull-requests/tree/main)_.
*   [Git](https://git-scm.com/downloads) – This tutorial will use Git on Windows in a working directory of _C:\\Git._
*   Git [set up to work with your GitHub account](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup)

## Forking the GitHub Repo

Since you cannot make direct changes to someone else’s GitHub repo, you must first create your own. To do that, you need to fork or make a copy of the repo under your own GitHub account. To do that:

1\. Open your favorite web browser, navigate to [GitHub](https://github.com) and log in.

2\. Navigate to the [tutorial’s repo](https://github.com/Adam-the-Automator/git-pull-requests/tree/main) or the repo you’d like to contribute to as you can see below.

![GitHub repository to fork](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-93.png)

GitHub repository to fork

3\. In the top-right corner, click on the **Fork** button. This button will automatically create a copy of that repository in your account.

![Forking a GitHub repo ](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-94.png)

Forking a GitHub repo

Once forked, you should now see the same repository in your repository list. You can also see below that this repo was **forked from Adam-the-Automator\\git-pull-requests**.

![Forked GitHub repo](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-95.png)

Forked GitHub repo

## Committing New Code to Your Personal Fork

Now that you have your own, personal copy of the repo in your GitHub account, it’s time to make your changes. You can make changes to code in a GitHub repo one of two ways; either directly through [_github.com_](http://github.com) or locally via Git. Let’s cover both ways.

### Committing Code via [github.com](http://github.com)

The easiest way to make changes to code in a GitHub repo is to simply use the web browser. By using [github.com](http://github.com), you don’t have to worry about setting up any kind of software locally. But, using the web browser will soon turn into a headache if you need to perform any moderately complex changes.

Assuming you’re still looking at the forked repo in your browser:

1\. Click on the _SampleText.ps1_ script in your forked repo and click on the pencil icon to edit it.

![Modifying code via GitHub](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-96.png)

Modifying code via GitHub

2\. Make change to the file and click on the **Commit changes** button as shown below optionally adding a commit message.

![Committing changes via GitHub](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-97.png)

Committing changes via GitHub

### Committing Code via Git

If you plan on making more than one, simple change to a file in the GitHub repo, you should use Git. Git allows you to clone the entire repo to your local computer and work on the code in your favorite code editor.

#### Cloning

To work on the forked repo’s code locally, you’ll first need to clone the entire repo to your local computer with Git. To do that:

Assuming you’re still at your forked repo on [github.com](http://github.com):

1\. Click on the **Code** button and copy the URL under the HTTPS section.

![Finding the Git clone URL](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-98.png)

Finding the Git clone URL

2\. Next, open a command-line console on your computer. This tutorial will use Windows PowerShell.

3\. Create a directory to store the cloned repo in and run [`git clone`](https://git-scm.com/docs/git-clone) pointing it to the URL copied from the previous step.

```powershell
md C:\Git
 cd C:\Git
 git clone https://github.com/adbertram/git-pull-requests.git
```

![Cloning a Git repo](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-99.png)

Cloning a Git repo

#### Committing and Pushing Local Files

Once you’ve cloned the Git repo, it’s time to change the file and commit those changes to the repo. To do that:

1\. Open your favorite code editor, edit and save the _C:\\SampleText.ps1_ script.

2\. In the terminal window, ensure your working directory is _C:\\Git_ and run the below command. [The `git add` command](https://git-scm.com/docs/git-add) adds the file to the local Git repo but does not save it. It simply begins tracking it.

```bash
cd C:\Git
 git add SampleText.ps1
```

3\. Next, commit or save all tracked files in the Git repo with the [`git commit` command](https://git-scm.com/docs/git-commit). Be sure to also include an explanation of what has changed (commit message) with the `-m` parameter.

```bash
git commit -m "modified sampletext file"
```

![Committing changes](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-100.png)

Committing changes

4\. Now that the local Git repo contains the changed file, _push_ that change up to the GitHub repo with the `g`[`it push` command](https://git-scm.com/docs/git-push). You should receive a box asking you to to provide your GitHub username and password to authenticate to your forked GitHub repo.

```bash
git push
```

5\. Once you’ve provided your GitHub username and password, you should then see Git provide some status information like below.

![Pushing Git commits](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-2021-04-20T191933.800.png)

Pushing Git commits

## Submitting a Pull Request

At this point, you now have a copy of the GitHub repo you’d like to contribute to (forked) in your own GitHub account with the change you’d like to request to the owner GitHub repo. It’s now time to submit a pull request to ask the owner to accept your change.

1\. Navigate to your forked repo on GitHub.

2\. Click on **Pull Requests** and the **New pull request** as shown below.

![Creating a pull request](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-2021-04-20T192023.850.png)

Creating a pull request

3\. On the pull request page, you’ll see the two repos that will be compared and each commit you’re requesting to merge into the owner’s GitHub repo. Click on **Create pull request**.

![Creating a GitHub pull request](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-2021-04-20T192102.451.png)

Creating a GitHub pull request

4\. Provide a title for the pull request and click on **Create pull request**.

![Opening a Git pull request ](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-2021-04-20T192156.930.png)

Opening a Git pull request

You will then see on the original GitHub repo, a pull request will show up. At this point, your job is done and it’s time to wait for the owner.

## Reviewing and Accepting a Pull Request

As soon as you create a pull request, it will show up under **Pull Request** under the original GitHub repo as shown below.

![Open pull request under the original GitHub repo](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-2021-04-20T192251.888.png)

Open pull request under the original GitHub repo

At this point, the owner will now either provide comments to you where you can collaborate on the pull request. Or, they can simply merge it right away by clicking on **Merge pull request**.

Once they merge the pull request with the original code, the pull request will go into a **Merged** status and the code will be merged with the original repo!

![Merged pull request](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-2021-04-20T192627.665.png)

Merged pull request

Now, you can see that you are a contributor to the file you changed and was merged.

![Contributor on changed file](https://adamtheautomator.com/wp-content/uploads/2021/04/Untitled-2021-04-20T192711.565.png)

Contributor on changed file

## Conclusion

In this tutorial, you learned each step on how to create a Git pull request. Pull requests are a great way to collaborate on GitHub repos.

Now that you know how to contribute to GitHub projects, what will be your next repo you contribute to?

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fgit-pull-request%2F&text=Contributing%20to%20GitHub%20Projects%20\(Git%20Pull%20Request%20for%20Dummies\))[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fgit-pull-request%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fgit-pull-request%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2024/01/gitops.jpg)

### [A Getting Started Guide to GitOps](/gitops/)

Embark on your GitOps journey—seamless, automated, and efficient. Explore the power of GitOps for streamlined workflows in this tutorial!

![](https://adamtheautomator.com/wp-content/uploads/2026/08/featured_image-5.webp)

### [Azure DevOps Boards: Trace Every Commit to Deployment](/azure-devops-boards-traceability/)

Configure Azure DevOps Boards process templates, backlogs, and Kanban WIP limits, then trace every work item from commit to deployment.

![](https://adamtheautomator.com/wp-content/uploads/2024/12/featured-image-8.webp)

### [Creating Custom GitHub Actions: A Complete Guide for DevOps Teams](/custom-github-actions-guide/)

Learn how to build custom JavaScript GitHub Actions to share standardized, reusable code across your organization's workflows. This hands-on tutorial walks through creating authentication and secret management actions.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
