Aparna Soneja Profile picture
Jun 19 23 tweets 8 min read
How to make your first Open Source Contribution (for beginners)
Ways to contribute:

1. By pushing your own code/ project from your local machine to GitHub.

2. By contributing to other open source projects:
2.1: Pick up & resolve open issues
2.2: Suggest any changes in the code/docs by creating a new issue or PR.
1. How to contribute your code to GitHub:

Go to GitHub-> sign in-> go to New repository
Give repository a name, make it public so that everyone can see your repo & add a Readme file-> click on create repository
This created a new repo, now u need to add files/ code from your system to this GitHub repo.
Now u get something similar as shown in SS. Click on ✏️ icon on readme file to edit the Readme.
Readme file will contain the details/ documentation of your project.
Add your code from your laptop/ PC to the repo by clicking on Add file->upload files->choose your files-> commit to the main branch & click on commit changes
If u need to upload a folder, just drag & drop that folder to the repo by clicking on "choose your files"
"Commit changes" means saving your changes.
By creating a new repo, adding code to it & committing your repo, u made your first contribution
Hurray🥳🥳
2. Contributing to other Open source projects:

For that u need to first search for a good Open source project to contribute to. For that, have a look on my thread:
After u have chosen your project to work on, read its Contributing & Code of Conduct files.
These files contain rules & guidelines to contribute to that particular project.
One way to contribute is to find an open issue of that project, resolving it & making a PR(pull request) to get it approved by the maintainer of that project.

First search for an issue u can resolve as a first timer/ beginner. For that, refer my thread:
After picking your issue, Follow the below steps.
I am taking EddieHubCommunity/good-first-issue-finder (github.com/EddieHubCommun…) as an example project for this thread.
Step-1: Fork the project by clicking on "Fork".
This means that you'll have a copy of the repository under _your-GitHub-username/repository-name_, which means it creates a new repo in my GitHub under aparna2071/good-first-issue-finder.
U can also change the name of repo if u want
Step-2: Clone the project:
Cloning means the whole code of good-first-issue-finder repo will be saved to your local machine(laptop/PC), which u can then make changes to.
Clone the project by clicking on Code-> Copy the URL on HTTPS
Create a new folder on your laptop/PC where u want to save this repo's code.
Open Command Prompt/Git Bash in that folder & run the command:
```
git clone <url_that_u_copied_from_HTTPS>

```
After cloning is done 100%
Step-3: Prepare the development environment: Read the Contributing or Readme files of that project to get an idea if anything needs to be installed on our system so as to run that project. If so, install those, otherwise skip this step.
Step-4: Go to the folder where the code of the repo is cloned.
```
cd good-first-issue-finder

```
Now, create a new branch before making changes to the repo on your local.
```
git checkout -b branch-name-here
```
Why to make a new branch?
-As u are experimenting your changes, if the experiment is successful, the new branch can be merged easily to the main one & if something is not correct, the changes can be discarded.
In this way, the changes don't affect the main branch.
Step 5: Make your changes in the code that u have on your system, u can either fix your chosen open issue or can also do some improvements in the code/docs if u don't find any suitable issue for u.
Step 6: Take the changes to the staging area.
Staging means adding the changes that are ready to be committed.
```
git add .
```
OR:
```
git add <changed_filename>
```
Suppose, I made change in README file
Step-7: Commit the changes
```
git commit -m "Add some message here like what changes u are making"
```
U can at any step check the git status so as to know about on which branch r u currently on & what has changed so far.
```
git status
```
Step-8: Push the changes from your local PC to your GitHub repository using:

```
git push origin branch-name-here
```
Step-8 will show some recent changes on your GitHub repo, click on "Compare & Pull request" which will make a Pull Request(PR).
PR is just a request to ask for approval for the changes u did from the maintainers of that project.
To Create a PR:
1. Give the pull request a title and a short description of the changes made.

2. Wait for the pull request to be reviewed by a maintainer. If your PR is good enough, then it will be approved & merged by maintainer otherwise they will suggest some changes.
Congratulations 🥳🚀 u made your first PR.
That's a wrap on "How to make your first Open source contribution".
I will be discussing "How to optimise your GitHub profile" ,"Some good open source projects to contribute" &"How to create new issue" in my upcoming threads.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Aparna Soneja

Aparna Soneja Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @AparnaSoneja

Jun 15
How to find good Open source projects for beginners/ first time contributors
1. If u want to practice a skill X, eg: React JS, search for React in the Explore tab on GitHub Image
2. Here u can see how many search results are shown up for React
The ones that I highlighted in red are the no. of stars on each project.
Select the project that has more stars, a good community & more no. of open issues. Image
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(