5

How to Make Your First Open Source Contribution

 2 years ago
source link: https://blog.bitsrc.io/how-to-make-your-first-open-source-contribution-92653f391a61
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How to Make Your First Open Source Contribution

In this post, you will be taken through how to make your very first open-source contribution.

Bit.dev’s open source software

Before you start

This article is for developers of all levels who are yet to make their first pull request. It is also for designers, technical writers, translators, and all other people in tech who need to collaborate and do so using open source technology like GitHub.

This post assumes that you have a basic knowledge of Git and so will not explain in detail the git commands provided.

What is open-source software?

Open-source software for me is simply software that the code is available in a public domain where people can view, edit, or modify, and basically contribute to improving. The codebase of any system is it a library, an application, a website, even an operating system is that part that is behind the scenes of these projects powering them.

Some people who write code for systems like this decide to make it public so that others can see and possibly contribute to and make improvements on, this is the meaning. Open source, the source code is open to all.

Who can contribute?

Anyone can contribute to open source, yes you read that right — it’s not just developers!

By definition, you have seen an OSS is and so you know that even though developers make up a large chunk of it, there are other players involved.

These players are product customers, product designers, technical writers, translators, quality assurance managers, product managers, and even project sponsors. These are the same exact type of people that would make software work wholistic, open-source or not.

So, you can even start today. Maybe you have come across a broken link in one of your favorite products before. You can check to see if that product is open-source and if it is, you can submit an issue and propose to fix it. It might most likely be a case of changing a URL.

Why is this important?

Contributing to open source can be very beneficial to you as you can gain valuable work and life experiences interacting with people from (most likely) different backgrounds, learning together, and sharing ideas. It is also a great way to showcase your passion for a project, be it an application or a library, or even a landing page.

Another great good reason to contribute to open-source is that you can give back to your community and the communities of other people (in ways you might even be unaware of) and even find your next career path in the process too.

First good issue

If you read this post from the beginning you might say “but I have not found a broken link anywhere, how do I still start contributing?”. The key is to find a good first issue, easy enough to make you start, good enough to show you how the contribution is done.

There are a lot of ways to find your first good issue to contribute to. Some open-source community members have also tried to make the process even simpler by building great resources like

These will provide you with a quick list of resources to work on as your first contribution.

Getting started: GitHub

Now that you have found a project to contribute to, I would put you through how to make a contribution to an open-source project. For this exercise, we will use this repository and our contribution will be to update a contributors list by adding our name.

First things first: Fork

The first thing to do when you want to contribute to an OSS is to fork it.

According to GitHub guides, after using GitHub by yourself for a while, you may find yourself wanting to contribute to someone else’s project.

Or maybe you’d like to use someone’s project as the starting point for your own. This process is known as forking. Open this link in your browser, there is a fork button at the top right of that project, click on it.

1*mtQ-Avx-W7CmktJstnP-Bw.png?q=20
how-to-make-your-first-open-source-contribution-92653f391a61

Next: Cloning

After forking, you will see that the project page you now see has your GitHub name attached to it. Now you have it on your Github, the next thing to do is to clone the project into your computer.

Open finder to a folder of your choice and open the terminal in that folder and then run the command below:

git clone https://github.com/YOUR_GITHUB_USERNAME/first-contributions.git

Remember to replace the letters in capital to your GitHub username. Now change the directory into the newly cloned folder and open the contributors.md file. You will see other people’s names also, add yours in the same format others were added, and then save the file.

Committing and pushing your changes

The next to do is to send these changes to the version of the file on GitHub. This is called pushing the changes, you first add the changes to tell Git that you want to hand over these changes to be pushed. Then you hand them over with a commit statement and a message of commitment and then you finally push the changes.

All these are done with three commands:

git add Contributors.mdgit commit -m "Added Lotanna to the Contributors list"git push -u origin master

If this is successful, head over to your browser and check the contributors on your forked version and you should see your name added there.

Submitting a PR

Remember what you have full access to is your own forked version of the project. But the aim is to contribute to the main project, the one you forked. So, this is done by submitting a pull request.

A pull request is simply a request for the owners or maintainers of the project you want to contribute to pulling your changes into the main project.

Now take a second look at the forked version, you will see that your branch is 1 commit ahead of the main project. Click pull request and GitHub will analyze your changes to see if it is fit to be merged to the main project and then display a submit a pull request button. Click on it and explain in details the changes you made, which in your case would be something like “I added my name to the contributors' list”

Contributing.mds

Every OSS project, especially on GitHub should have a contributors guide document, most projects call it contributing.md. It is usually a markdown document where the owners and maintainers of a project have specified how to contribute to their project so that they can track and merge PRs easily and also for clarity.

GitHub reminds you to check it out before any PR is sent, so do not worry because you cannot miss it.

Congratulations! 🎉

After your pull request has been sent, congratulations! you have made your first open-source contribution which will be merged as soon as possible. I hope this is a simple guide to starting your first OSS contribution. I would like to know about your first experience and what project you contributed to, let me know in the comments. Happy hacking!

Build Micro Frontends with Bit’s Open Source Software

Instead of building monolithic apps, build independent components first and compose them into features and applications. It makes development faster and helps teams build more consistent and scalable applications.

Bit offers a great developer experience for building independent components and composing applications. Many teams start by building their Design Systems or Micro Frontends, through independent components.
Give it a try →


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK