🦄 Making Your First Github Contribution
September 1, 2020
•
3 min read
Open Source is really great and it has a lot of advantages but many people find it difficult to contribute to open source. I am writing this as a simple guide to make your first contribution on github.
First Contributions is a github repository that is focused helping beginners to make thier first open source contribution. I will guide you through the steps.
You must have git installed on your computer.
Fork the Repository
Navigate to the firstcontributions/first-contributions repository and fork it. Forking a repository is creating an exact copy of the repository in your github account up to the latest git commit message.
Clone the repository
Click on the green code button and copy the clone link. On your computer with git installed, navigate to the directory you want to save the files and open your terminal in the directory.
Create a branch
To avoid any conflicts, create a branch to save all your changes then your branch will be merged. First change into the directory with the command below
Then create a branch with the checkout
command
Make your Changes
Open the directory in your code editor. I like vim. Then make changes to the Contributors.md
file.
Add your name at the end of the file with your github profile link then save the changes.
Commit your changes
After you save the changes, head back to the terminal to commit your changes.
First, add the new changes to your branch with the add
command
Then commit the change with the commit
command.
Push your changes to Github.
Push your changes to your remote repository using the push
command.
Open Pull Request
After the git push
has completed, head to your repository and you'll see this.
Click on the Compare button to check if your branch can merge without conflicts. If there are no merge conflicts, click on the Create Pull Request button to create a new pull request.
Now click on the Create Pull Request button to create a new Pull Request.
The repo has been linked to a bot so the pull request will be merged immediately
Congratulations 🎉, you just made your first contribution. The pull request will be merged very soon and you will get a notification email once the PR is merged.