Skip to main content

Lesson 5 of 6 · 25 min

Pushing to GitHub and opening your first pull request

Put your repo online and learn the pull request flow used by every open source project.

Create the repo on GitHub

  1. Sign up / log in at github.com (free).
  2. Click New repository, name it foss-practice, keep it Public, do not tick "Add a README" (you already have one).
  3. GitHub shows you a "push an existing repository" section. Connect and upload your repo:
git remote add origin https://github.com/YOUR-USERNAME/foss-practice.git
git push -u origin main

origin is a nickname for your repo's home on GitHub. push uploads your commits. Refresh the GitHub page — your project is online, with full history.

The pull request (PR) flow

A pull request says: "Here are commits on my branch — please consider adding them to the project." A maintainer reviews, comments, and merges or requests changes. This review step is the heart of open source quality.

Practise it on your own repo (the same flow you will use on real projects):

  1. Make a branch with a change and push it:
git switch -c add-license
echo "MIT License - see LICENSE file" >> README.md
git add README.md
git commit -m "Note the MIT license in README"
git push -u origin add-license
  1. GitHub shows a yellow banner: "Compare & pull request". Click it.
  2. Write a short title and description of the change, then Create pull request.
  3. Review it yourself, then click Merge pull request.

Keep main in sync

git switch main
git pull

pull downloads anything new. On real projects you will pull often, because other volunteers keep contributing while you work.

You now know the complete loop — branch → commit → push → pull request → merge. It is the same loop used to improve Linux and your favourite apps.

Next lesson: finding real projects that want your help.

Finished this track? FOSS Andhra certificates are issued for internships, workshops and events — check what you can earn next.