This project aims to simplify and guide the way beginners make their first contribution. If you are looking to make your first contribution, follow the steps below.
If you don't have git on your machine, install it.
Fork this repository by clicking on the fork button on the top of this page. This will create a copy of this repository in your account.
Now clone the forked repository to your machine. Go to your GitHub account, open the forked repository, click on the code button and then click the copy to clipboard icon.
Open a terminal and run the following git command:
git clone "url you just copied"
where "url you just copied" (without the quotation marks) is the url to this repository (your fork of this project). See the previous steps to obtain the url.
For example:
git clone https://github.com/<your-github-username>/first-contributions.git
Here you're copying the contents of the first-contributions repository on GitHub to your computer.
Change to the repository directory on your computer (if you are not already there):
cd first-contributions
Now create a branch using the git checkout
command:
git checkout -b new-branch-name
For example:
git checkout -b add-<your-github-username>
Now create first-contributions/<your-github-username>.md
in your editor, add ## Hi, I'm <first name> <last name>
to the file and then save it.
If you go to the project directory and execute the command git status
, you'll see there are changes.
Add those changes to the branch you just created using the git add
command:
git add first-contributions/<your-github-username>.md
Now commit those changes using the git commit
command:
git commit -m "add <your-github-username>"
Push your changes using the command git push
:
git push origin add-<your-github-username>
If you go to your repository on GitHub, you'll see a Compare & pull request
button. Click on that button.
Now create the pull request.
Our mentors will then be notified of your pull request and either approve (and merge) your contribution, or request changes.
You will get a notification email in either case.
Congratulations! You just completed the standard fork -> clone -> edit -> pull request workflow that you'll encounter often as a contributor!
See our list of projects to help you continue your journey into open source.
And be sure to join our discord server if you haven't already.