Chapter 3. Editing
In this chapter weâll look at how you can contribute to a project. Weâll start by looking at how to contribute to a project that you donât have permission to push to by creating a fork and a pull request. Weâll then look at how you can add, edit, rename, or delete a file directly on GitHub. Weâll also look at how to work with directories on GitHub, and finally weâll discuss what to do when you want to make multiple changes as part of a single commit.
Contributing via a Fork
If you want to contribute directly to a project, you either need to own it or have been added to it as a collaborator. If you want to contribute to a project that you donât own and are not a collaborator on, youâll need to make a copy of it on GitHub under your user account. That process is called forking. Once youâve forked a project, youâll be able to make any changes you want to your fork (copy) and youâll be able to request that your changes get incorporated into the original project by using a pull request. Letâs go through that process now.
Go to https://github.com/pragmaticlearning/github-example. Click the Fork button in the top right corner of the page, as shown in Figure 3-1.
When you click the Fork button, if you are a member of any organizations, youâll see a list of all of the organizations youâre involved with as well ...
Get Introducing GitHub now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.