How To Write Your First Pull Request

Kalana Wijethunga
2 min readNov 10, 2018

--

This is a continuation of my first article on How to start with Open Source. If you couldn’t read it here is the link.

So Lets Move On!

How to setup your project?

Actually project installation differ from project to project and according to the environment you use. Once you find out CONTRIBUTING.md file of a project it will have all the information you need to setup the project. Most of the times it would be cloning the repo and typing a few commands.But first, make sure you fork the repo before cloning it(Go to the repo,on the top right you can see the button with a label fork,click it).This gives you a copy of the repository on your GitHub account so that you have permission to do your changes and update them.Go ahead and setup your first open source project.

GitHub WorkFlow

So lets go to the part which we don’t understand. Many of the beginner open source contributors are excellent coders who are not experienced in this work flow. So let me clear this out for them.

  1. Create a branch and write your code resolve a selected issue
  2. Commit the changes
  3. Push the changes to origin
  4. Create a pull request

How to write your first pull request ?

Woah! what is a pull request? A pull request is a message which let the other interested parties to know the changes you have done.They will review changes, discuss modifications,push follow-up commits or merge your changes into master.

So pull request is the request to merge your code into master once you do some change.If you don’t know how to create a pull request,this is how.After pushing your changes to the origin go to the repo of the code which appear under your account.A button will appear with the label Create Pull Request.Click it.

Different organizations have different styles of writing pull request.A sample structure will be shown to you.If no sample is given make sure you write the issue number and a detailed description of the solution.

That’s it! Now you can start with open source contributions with ease

Happy Coding!

--

--

Kalana Wijethunga
Kalana Wijethunga

Written by Kalana Wijethunga

Software Engineer @WSO2 @CERN| GSoC Participant | @UOM Grad| Computer Science and Engineering

No responses yet