Make Your First Open Source Contribution With Ease.

Make Your First Open Source Contribution With Ease.

A comprehensive beginner guide to contributing to Open sourceπŸ₯‘

Β·

5 min read

⭐ WHAT IS OPEN SOURCE πŸ₯‘ ?

Open source software is software with source code that anyone can inspect, modify, and enhance.

"Source code" is the part of software that most computer users don't ever see, it's the code computer programmers can manipulate to change how a piece of software a "program" or "application" works. Programmers who have access to a computer program's source code can improve that program by adding features to it or fixing parts that don't always work correctly.

Furthermore open source is social coding, so it's like social media but on steroids, on places like instagram people can like your photos, they can also re-share. On a place like Github people can not only star your project, comment on your code, fork your project to share it, but they can also contribute back, they can make improvements, we can stand on the shoulder of giants and other awesome projects to make even better projects and then we can contribute features and bug fixes back to that original project.

⭐ WHY YOU SHOULD CARE ABOUT OPEN SOURCE πŸ€”πŸ‘πŸΎ

You should care about open source πŸ₯‘ because you are probably using a lot of open source projects and probably most of these projects, if not all the tools you use are open source and this is awesome. And thanks to us, open source is available because of people like you, who contribute to them, and you may think you are not an expert to contribute to any project but your fresh pair of eyes could mean allot, so making that contribution no matter how little it may seem will not only allow you to improve your communication skills, it will also allows you expand your network and your skills. Asides that, companies and recruiters are on Github looking for people and they are not looking for the best coders they are also looking for the right attitude.

⭐ GIT AND GITHUB

GIT: There are a lot of source control management systems but GIT is on top of the list. It has a traditional save point where you can save your work as you go along and when you are happy with it, in summary when you make a mistake you can go back to your previous save points, the source control management systems also have branching so you can create a copy of the work and do certain things and still have those savepoints. The big main advantage of git is that it is very efficient, it is fast, and it is distributed, which means you can work offline and then reconnect when you get internet connection and you can do things like rebase which is like rewriting history, so basicallly git is a great tool for collaboration.

⭐ HOW TO CREATE A PULL REQUEST

If you have never created a pull request this article will help you with steps on how to make your first contribution on github.

⭐ MAKING A PULL REQUEST

After Cloning the project. these are some useful git commands I took a note of while making my first contributions. I sometime come to peep at them when using the terminal.

useful git commands

πŸ“ŒNOTE: Read through all the git commads before using them

πŸ₯‘ git status = this commad checks and show you what branch you are on.

πŸ₯‘ git branch = this commad checks and show you the branches you have acces to.

πŸ₯‘ git log = this commad checks and show you the history in the current current branch you are on

πŸ₯‘ q = pressing q as in "quit" gets you out of git log

πŸ₯‘ cd "name of project" = this commad changes your directory into the project you are working on

πŸ₯‘ ls = shows you the name of project you are on

πŸ₯‘ git remote -v = this commad checks and show you the remote branches you have access to.

πŸ₯‘ code -r . = to open project up it up

⭐ Making changes and getting it into the upstream master branch

before you make a change make sure to check out a new branch

πŸ₯‘ git checkout -b "name of branch related to the issue you are fixing" = this puts you on the branch you just created.

πŸ₯‘ git branch = to show branhces you have access to.

go to file make changes as you make a change you can add them to your commits then once you have decided you can commit your stage and work from there use the back vs code to revert changes you don't want.

⭐ Ready to Push to Github

πŸ₯‘ git status = show you the file name

πŸ₯‘ git add "name of file " = adds files you made changes to adn set it up ready to be commited.

πŸ₯‘ git commit -m "Commit message which should be a description of what you just did" = commits all changes ready for push

πŸ₯‘ git push origin "name of branch" = basically when you clone a fork, and you are pushing changes it goes to the remote origin on github then you can add more commits , changes and push and when satisfied with the changes you compare and create a pull request.

when you want to match all changes from the master remote branch and push allong side your changes.

first set up local repo to connect remote main upstream (remote) repo,

πŸ₯‘git remote add upstream "http link to the repo " = adds remote at this point when you do a git remote -v its going to show you all the remote branches you have access to.

πŸ₯‘ git fetch upstream = to fetch all changes to local copy.

πŸ₯‘ git reset --hard upstream/master = to match main upstream repo

πŸ₯‘git push origin master = pushes all the hanges.

⭐ USEFUL GIT COMMANDS

usefull Git commands I find usefull you can peep them while working with Git on the terminal.

If you love learning with videos this video should get you off to a good start.

HAPPY OPEN SOURCING πŸ₯‘πŸš€πŸŽ‰πŸ’™

Β