Making your first Open Source Pull Request

Open Source softwares are softwares for which the original source code is made freely available and may be redistributed and modified. As a Programmer, we are more interested in how to contribute to their codebase.
A lot of newcomers find Open Source to be dreadful and daunting. But worry not, every great Open Source contributor had once been in a place that you are in right now.

Open Source

The following article may be helpful for those who wanna step into the amazing world of Open Source.

Before we begin
Following are the prerequisites required before diving into Open Source:

  • Good understanding of at-least one programming language of your choice
  • Version Control: Git/SVN and Github/Bitbucket/Gitlab
  • Learn to read large source code so that it doesn’t appear gibberish. This article might help.
  • Learn how to use Bug/Issue Trackers

Where to start?
Following are a few resources found to be useful for newcomers:

The given resources consists of a list of projects by different organisations which can be filtered on the basis of programming languages used, category of project(Eg. Web, Databases, etc) and difficulty.

Steps to make a Pull Request:
Once you decide the repository you want to contribute to or the issue you want to work on, follow the steps in order to make your first pull request:

  1. Read the CONTRIBUTING.md guide(If present)
  2. Contributing.md file

  3. Discuss with the maintainers about the issue, ask questions(if any) and clear doubts. They are lovely people and are always ready to help. You might also ping them over their IRC or Mailing lists.
  4. Go ahead and Fork the repository
  5. Fork a repository
    Fork a repository

  6. Clone the repo: git clone https://github.com/YOUR_USERNAME/PROJECT.git
  7. Clone repository

  8. Add Upstream: git remote add upstream https://github.com/PROJECT_USERNAME/PROJECT.git
  9. Create new branch: git checkout -b BRANCH_NAME
  10. Create new branch

  11. Code Code Code: Make required changes
  12. Push changes: git push origin BRANCH_NAME
  13. Create pull request through Github
  14. Create a PR

Some other useful commands:

  • To check remote links: git remote -v
  • To check Branches: git branch
  • To delete branch: git branch -D BRANCH_NAME
  • To delete branch on Github: git push origin --delete BRANCH_NAME

Now all you have to do is wait for your changes to be reviewed by the maintainers and merged(or discarded).

It feels good when you find that a piece of your written code is being used by people all around the world on a daily basis.
On a side note, you might wanna check out GSOC. If this doesn’t motivate you begin with Open Source, then nothing else might.
GSoC

See Also – How to get started with Open Source.

This article is contributed by Raghav Jajodia. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

GATE CS Corner    Company Wise Coding Practice





Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.