layout |
---|
default |
Let's get started making our first Pull Request.
The first step in your journey to making a Pull Request against an existing repository is to create a copy of that repository. There are many ways to copy a repository, the method we'll use is called forking. Read More
To fork a repository, head to its webpage and select the Fork button.
If you are a part of any Organizations, you will be prompted to pick where to Fork the repository to - either an Organization or your own personal account. For this tutorial, select your own account.
Next, we'll make changes to the repository we forked. Again, there are many ways to modify the content of a repository. For this tutorial, we'll be using the GitHub web interface to make our changes.
We will be updating a file called contributors.yml and adding our own GitHub username to it.
To begin - locate the file you'd like to modify.
Locate the Edit icon (a pencil) and select it. You'll now be able to modify that file directly. And, don't worry about making mistakes - were in our own copy (a.k.a. fork) of the repository, so it doesn't matter if we mess up!
After your modifications are complete, you need to save them. Scroll down to the area entitled Commit changes
There, add a short message describing your changes (e.g. "Added username") and select Commit changes
It's finally time to create our request to have our changes pulled into the original repository.
Select the Pull requests tab, then New pull request
[IMAGE HERE]
GitHub will automatically understand that you want to introduce the changes in your forked repository into the original repository. It will show you on the Comparing changes page exactly what the difference is between the original repository and your fork (this set of changes is called a "diff").
[IMAGE HERE]
To finish off creating the Pull Request, fill out the form entitled Open a pull request - add a title for your Pull Request and an optional description. Lastly, select Create pull request
[IMAGE HERE]