How to make your First Open-Source Contribution?
Subscribe to my newsletter and never miss my upcoming articles
Let's make our first open-source contribution with first-timers repository!
If you don't have a GitHub account already, then create one.
Excited? Let's Begin!
Go to this GitHub repository and fork this repository to your account.
Click on the fork button on the top right corner of the repository page to do it. Once done, GitHub will take you to the forked copy in your account.
Clone the forked repository to your local machine. Click on the big green button saying "Clone or download" and copy the https url of your repository.
If you're on Windows, fire up Git Bash navigate to your project directory and type the following command.
Replace the link with the clone URL of your repository and hit Enter.
git clone https://github.com/your_username/first-timers.git
Let's start working on the changes required now! First
cd into the cloned folder by typing the following command.
In your file manager/terminal navigate to the cloned repo. Open the
Contributors.md and add a new line to the end of the file.
It should like this 👇
- #### [Your Name]( )
Commit the changes with a suitable commit message. First, we need to stage all the changes we made. Open the terminal inside the project directory and execute the following commands.
git add .
The above command stages all the changes, now let's commit it with a suitable message.
git commit -m "Your_Commit_Message"
Let's push the changes to your repository! Execute the following command to push all the changes to the forked copy in your GitHub account.
git push -u origin
Now, open your forked repository on GitHub. If your changes have been pushed to your forked copy, You'll be able to see an option saying "Pull Request" in your repository.
Then click on create pull request. Once you fill in the commit message and comment. Click on submit pull request.
Now, Wait for a reviewer to review your file and merge it to the master. Once it been successfully merged, your account will appear on the contributor's list.
And Tada 🎉! You just made a contribution to Open Source.