How to create a Pull Request on GitHub
If you want to contribute to a project on GitHub, the way to do it is by creating a pull request. I broke it down into these easy-to-follow steps:
- Fork the project: You start off by going to the project you want to contribute to on GitHub and create a fork. This will create a copy of the project in your repositories
- Clone the Fork: Click on Clone or download in your forked repository, copy the link, create a folder on your local machine and run
git clone firstname.lastname@example.org:Username/fork.git
- (Optional:) Create a new branch: If you want your changes to be in an own branch, run
git checkout -B branchName
- Make local changes: Make the changes in your cloned repository.
- Commit the changes to your fork: Change into your repository and run
git add .
git commit -a -m "Describe your fixes"
(Optional for new branches:)
git push --set-upstream origin branchName
- Create the pull request on GitHub: Go to your fork on GitHub and click on Pull-Request and fill out the description. You’re done.