Codetopia
How-tos

contributing

Your first pull request, in your browser

5 min read

You will add a short file about yourself to our practice project on GitHub, and we will accept it. About 15 minutes. You cannot break anything: the project is made for practice.

Take your time. Everyone here started as a beginner. Stuck at any point? Ask in channel ask-for-help.


Before you start

  1. You need a GitHub account. No account yet? Create one, it is free. Then make sure you are signed in on github.com.

  2. Click your profile picture: the small circle at the top right.

    You will see: a menu. Your username is at the very top. Write it down exactly, with the same letters and dashes. Then click anywhere else to close the menu.

    The menu, with your username at the top


Step 1: Make your own copy

  1. Open our practice project: open-source-practice.

  2. At the top right, click the word Fork. A fork is your own copy of the project.

    Our practice project, with the Fork button at the top right

    You will see: a page called Create a new fork. If GitHub asks you to sign in first, sign in and carry on.

  3. Change nothing. Click the green Create fork button.

    The Create a new fork page, with the Create fork button

    You will see: Forking... for a few seconds, then your copy. Under the big title it says forked from codetopiacommunity/open-source-practice. That line is how you always know you are in your copy.

    Your copy, with forked from codetopiacommunity/open-source-practice under the title

WARNING

Do you see "No available destinations to fork this repository"? You already made a copy before. Click the link under that message: it opens your copy. Then go on to Step 2.

The message No available destinations to fork this repository, with the link to your copy


Step 2: Create your file

  1. In your copy, click the contributors folder.

    Your copy, with the contributors folder

  2. At the top right, click Add file, then Create new file.

    The Add file button, and Create new file in its menu

    On a phone, there is no Add file button. Tap ⋯ at the top right, then Create new file. Do not tap the red Delete directory.

    On a phone: the ⋯ menu with Create new file at the top

    You will see: a small box that says Name your file..., and a big empty box below it.

    The new file page, with the Name your file box and the big empty box

WARNING

Do you see "You need to fork this repository to propose changes"? You are in our project, not your copy: there is no forked from under the title (on a computer, the top left also says codetopiacommunity). Do not click the green button on that page. Go to your copy instead: click the small circle at the top right, then Repositories, then open-source-practice. Then do Step 2 again.

The page that says You need to fork this repository, with codetopiacommunity at the top left


Step 3: Write about yourself

  1. Click inside the Name your file... box. Type your username, then .md (a dot and the letters m and d), with no spaces. For example:

    plaintext
    kofi-mensah.md
  2. Copy these lines. On a computer, move your mouse over the grey box: a small copy button appears at its top right. Click it. On a phone, the copy button is always there.

    plaintext
    # Your Name
     
    - From: Your city, your country
    - Learning right now: what you are learning
    - Fun fact: one thing about you

    The grey box with the copy button at its top right

  3. Click inside the big box on GitHub and paste: press Ctrl and V together (Cmd and V on a Mac), or right-click and choose Paste. On a phone, press and hold inside the box, then tap Paste.

  4. Change the words to your own. Keep the # and the - at the start of the lines. For example:

    plaintext
    # Ama Owusu
     
    - From: Kumasi, Ghana
    - Learning right now: HTML and CSS
    - Fun fact: I can solve a Rubik's cube

    You will see: your file name in the small box, and your lines in the big box.

    The file name and your lines on GitHub

    If a line with only a - appears at the end, delete it.


Step 4: Save it

  1. Click the green Commit changes... button at the top right. Commit means save.

    You will see: a box in the middle of the page.

  2. Click the green Commit changes button at the bottom of that box. You can leave everything else as it is.

    The Commit changes button at the top, and the Commit changes button in the box

    You will see: your file in the list, and near the top it says This branch is 1 commit ahead of codetopiacommunity/open-source-practice:main.

    Your file in the list, and 1 commit ahead near the top

WARNING

Do you see "A file with the same name already exists"? You added your file before. Click Cancel, then click contributors at the top of the page, and go on to Step 5.


Step 5: Ask us to take it

  1. On the line that says 1 commit ahead, click Contribute, then the green Open pull request. A pull request asks us to take your change into our project.

    The Contribute button, and Open pull request

    You will see: a page called Comparing changes, with Able to merge in green.

  2. Change nothing. Click the green Create pull request button.

    Able to merge, and the Create pull request button

    You will see: a green Open label at the top. That is your pull request.

    Your pull request, with the green Open label

You are done when

🎉 You did it. You made your first pull request. There is nothing else you need to do right now.


What happens next

Someone from our team looks at your pull request. When they do, GitHub sends you an email, and a blue dot appears on the inbox icon at the top right of GitHub. Click it to see what happened.

The inbox icon with a blue dot, and the notification

A purple Merged label means we accepted it. Your file is now in our project. Share it in channel wins-and-milestones!

Your pull request with the purple Merged label

If we ask for a change, that is normal. Go to your copy (the small circle, then Repositories, then open-source-practice), click contributors, then your file. Click the pencil at the top right of your file.

Your file, with the pencil at the top right

Make the change, then click Commit changes... and Commit changes again, as in Step 4. Your change joins the same pull request on its own.

Your file open for editing, with the Commit changes button

Nobody has replied after 3 days? Ask in channel ask-for-help, and paste the address of your pull request's page. To copy it, click the bar at the very top of your browser (the address starts with https://github.com/), then press Ctrl and C together (Cmd and C on a Mac).


Optional: show it on your portal profile

Once we accept it, your pull request can also show on your Codetopia portal profile, marked PR merged. The portal just needs to know your GitHub username:

  1. Open your profile settings. Log in first if the portal asks.
  2. Scroll down to Social Links.
  3. In the box that says github.com/username, type the GitHub username you wrote down at the start.
  4. Click Save Changes.

You only do this once. Every pull request we accept from then on shows up on its own, within about 15 minutes.