Make a Git pull request
Table of Contents
If you want to contributed to a project hosted on GitHub you will find the majority of the projects ask that you do it in the form of a Pull Request. If you want to learn more about how to submit a pull request read on.
- The first thing you will need to do is Fork the project you want to contribute to by open the project repository. Once you have the repository open you can use the Fork button found in the top right of GitHub interface. [Figure-1]
- Next you want to Clone your newly forked project by clicking the Clone or download button and copying the URL. [Figure-2]
After you have copied the Clone URL head over to PhpStorm and go to: [Figure-2a]
VCS -> Checkout from Version control -> Git
Next paste in the Clone URL from earlier and check you are happy with the auto generated name and click Clone.
Once you have opened your newly cloned project in PhpStorm make all the necessary code changes.
When you have finished updating the code you can Commit and push the changes back to your fork by going to: [Figure-3]
VCS -> Git -> Push
- In the next window give your commit a meaningful Commit Message, check the Author field and when you are ready use the Commit button's drop down option and select Commit and Push. This will take care of both tasks at the same time.
- Back in GitHub open your Fork and either click the New pull request button found next to the branch selector or use the green version found under the Pull request tab. [Figure-4]
Give it a title and description explaining in detail why you have made the changes and then submit it.
You should now see your Pull Request listed back in the original project's repository under the Pull requests tab and also in your profiles Pull request list by using GitHub's top menu. [Figure-5]
- Now you just need to wait for feedback from the project managers and if all is well you will get your changes merged back into the project. [Figure-6]
You can check out a new project using any open PhpStorm project and don't worry it won't affect the current project just choose to open it in a new window
Give as much detail as possible with your pull request to help the project managers understand why you have made your changes and help then check and potential test your proposed changes.
When you have submitted your Pull request make sure it passes all the checks and gets a nice green tick to give it it's best chance of being accepted. [Figure-7]
- Git: 2.7.4
- Ubuntu: 16.04 LTS
- PhpStorm: 2018.2.6
If you need more help or have any questions regarding this guide feel free to: