Announcements

We have recently been working hard migrating our websites over to a new hosting provider so if you experience any problems please let us know so we can fix them as soon as possible.

Steven Palmer

Contact Us

Make a Git pull request

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 try this guide.

Table of Contents

  1. Intro
  2. Guide
  3. Tips
  4. System Information
  5. Need More Help?

Intro

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.

Note: This guide was created using the IDE PhpStorm on a Ubuntu based machine but the fundamentals remain the same for most setups.

Guide

  1. 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]

Figure-1

  1. Next you want to Clone your newly forked project by clicking the Clone or download button and copying the URL. [Figure-2]

Figure-2

  1. After you have copied the Clone URL head over to PhpStorm and go to: [Figure-2a]

    VCS -> Checkout from Version control -> Git 
    

Figure-2a

  1. Next paste in the Clone URL from earlier and check you are happy with the auto generated name and click Clone.

  2. Once you have opened your newly cloned project in PhpStorm make all the necessary code changes.

  3. 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
    

Figure-3

  1. 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.
Note: There are many ways to commit and push changes in PhpStorm this is just one example but feel free to do anyway you feel comfortable with.
  1. 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]

Figure-4

  1. Give it a title and description explaining in detail why you have made the changes and then submit it.

  2. 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]

Figure-5

  1. 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]

Figure-6

Tips

  • 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]

Figure-7

System Information

  • Git: 2.7.4
  • Ubuntu: 16.04 LTS
  • PhpStorm: 2018.2.6

Need More Help?

If you need more help or have any questions regarding this guide feel free to:

  • Start a new forum topic if it wasn't covered by this guide
  • Send an email to support at our domain name
  • Send a tweet or a Twitter direct message to @coalaweb
  • Contact us through our Facebook page
  • Alternatively, you can use our Contact Us form
Written by Steven Palmer Wednesday, 01 August 2018 Posted in Programming, Git

GET IN TOUCH

We will be glad to help you with any general or technical questions.