Are you interested in contributing to open-source projects on GitHub but unsure where to start? This guide will walk you through successfully adding to existing code on GitHub using Git. Learn how to navigate the GitHub interface, fork and clone repositories, change existing code, and submit pull requests. Whether you're a seasoned developer or a beginner, this guide will give you the skills and confidence to contribute to open-source projects and collaborate with other developers on GitHub.
Tips:
- Fork the repository to create a personal copy
- Clone the forked repository using SSH (or HTTPS/GITCLI)
- Ensure to configure SSH on your GitHub
Step 2:
Clone (download) on your local repository (gitbash)
using
git clone "paste the ssh URL copied from github"
Step 3:
Ensure it's downloaded by running a command
ls
Step 4:
The cd
into the directory
Step 5: Create a branch
git checkout -b feature/update-events
Step 6:
ls
to see the list of files and what you're editing
Step 7:
Edit the file using Vim
Step 8:
Insert your edit by pressing I, after save and exit using escape, then :wq! and enter
Step 9:
Check the status of your edit by using
git status
Step 10:
Add the file by using
git add "name of the file"
Then, confirm it added but using git status
again
Step 11: Commit changes and also add a message
git commit -m "whatever changes you made"
Step 12: Push your update
git push
you might have an error, but don't panic just copy the name suggested and run the command again.
You've successfully made a pull request
Step 13:
Go back to your GitHub to compare & pull request
Remember, contributing to open-source projects is a great way to collaborate with other developers, learn new skills, and build your portfolio. Don't be afraid to explore and contribute to different projects on GitHub.
Top comments (0)