-
Browse GitHub and find a project that piques your interest.
-
A fork is a copy of a repository that allows you to freely experiment with changes without affecting the original project. Click the fork button on the top right of any project to do so.
-
Locate the green "code" button on your newly cloned project.
Click the clipboard button to copy the repository web URL.
In your terminal type$ git clone https://github.com/<YOUR-USERNAME>/<ORIGINAL-REPOSITORY-NAME>
.
This creates a local repository from your remote one. -
Open your newly cloned repository by typing
$ cd ORIGINAL-REPOSITORY-NAME
.
Then type$ git checkout -b <BRANCH-NAME>
to create a new branch. -
Open up the project by typing
$ code .
, and make the appropriate changes. You can alternatively open the repository in any other IDE too. -
Add your changes by typing
$ git add .
.
Then add a commit message by typing$ git commit -m "YOUR-COMMIT-MESSAGE"
.
Lastly, type$ git push origin <BRANCH-NAME>
to push all of your changes back to your remote repository. -
Navigate back to your forked repository on GitHub. You can now see a "Create Pull Request" button on the main page. Click the "Pull requests" tab and select "New pull request".
Be sure to select the appropriate branch you want to merge from and to.
Finally, click "Create pull request" to create your pull request.