30 lessons

GitHub Tutorial for Beginners

Learn GitHub step by step, from your first repository to pull requests, code review, GitHub Actions and GitHub Pages, with practical workflows for real team collaboration.

Browse all 30 lessons by stage

Lessons
30
Code examples
70
Exercises
110
Quiz questions
120

GitHub course at a glance

Who it's for

Beginners who want to share their code, students building a portfolio, first-time open-source contributors, and developers whose team has just moved to GitHub.

Prerequisites

Basic Git: commits, branches and pushing. Finish the Git tutorial beginner and intermediate stages first, or take them alongside this course.

What you need

A free GitHub account, Git on your computer and a web browser. The GitHub CLI (gh) and GitHub Desktop are optional extras covered in the lessons.

How long it takes

About two weeks for the beginner and intermediate lessons at an hour a day, and another two weeks for Actions, the advanced lessons and in-depth guides.

GitHub roadmap: beginner to advanced

Work through the 20 core chapters in the first three stages in order, then use the reference stages to go deeper. Each reference lesson links to its prerequisite and includes examples, practice and a quiz.

What is GitHub?

GitHub is a website for storing and sharing Git repositories. It gives every project a home online, where you can back up your code, show your work to employers, collaborate with teammates and contribute to open-source projects used by millions of people.

GitHub is built on Git. Git tracks changes on your own computer; GitHub hosts a copy of the repository on the internet and adds tools around it: pull requests for proposing and reviewing changes, issues for tracking bugs and ideas, and GitHub Pages for publishing websites straight from a repository.

This course has three stages. The beginner stage creates your account and first repository, teaches the Markdown used for README files, builds a profile that shows your best work, connects Git securely with SSH keys or tokens, and moves code between your computer and GitHub. The intermediate stage is about working with other people: issues, pull requests, code review, forks for open-source contributions, templates and community files, planning with Projects, and sharing with gists and wikis. The advanced stage covers publishing, automation and administration: websites with GitHub Pages, tests and deployments with GitHub Actions, versioned releases, organizations and teams, security features, cloud development with Codespaces and the gh command-line tool.

It's the natural next step after the Git tutorial, and the perfect way to publish the pages you build in the HTML and CSS courses.

How to follow this course

Work through the 20 core lessons in order, because each one builds on the last. After that, the in-depth guides cover what growing teams and projects need. The review and repository rules guides cover CODEOWNERS and rulesets with required checks and merge queues. The workflow guides go deeper into GitHub Actions: contexts and expressions, reusable workflows, caches and artifacts, token permissions and fork safety, and deployment environments with OIDC. The project management and services guides cover the REST API with pagination and rate limits, issue forms and GitHub Packages. Each guide lists the core lessons to finish first.

What you will learn

11 practical skills, built one lesson at a time

  • Explain what GitHub is and how it relates to Git
  • Create a repository and write a clear README in Markdown
  • Build a GitHub profile that works as a portfolio
  • Connect securely with SSH keys or tokens, then push, pull and clone
  • Track work with issues and plan it with GitHub Projects
  • Propose, review and merge changes with pull requests
  • Contribute to open-source projects through forks, guided by templates and community files
  • Publish a website with GitHub Pages
  • Automate tests and deployments with GitHub Actions
  • Publish versioned releases and manage organizations, teams and security settings
  • Develop in the cloud with Codespaces and work faster with the gh CLI
30 lessons70 examples110 exercises

Practise GitHub your way

Learning sticks when you use it. Pick a mode.

GitHub FAQ

Do I need to learn Git before GitHub?

It helps a lot. GitHub stores Git repositories, so knowing how commits and branches work makes everything on GitHub make sense. The first lessons of our Git tutorial take about an hour and cover all you need.

Is my code public on GitHub?

Only if you choose. When you create a repository you pick public, which anyone can see, or private, which only you and the people you invite can see. You can change it later in the repository's settings.

Can I use GitHub without the command line?

Yes. You can create files, edit them and make commits right on the GitHub website, and the GitHub Desktop app gives you buttons for push, pull and branches. This course shows the commands because they work everywhere, and mentions the website buttons as you go.

Why do employers look at GitHub profiles?

A GitHub profile shows real projects, how you write code and how you work with others through pull requests and issues. For beginners, a few small, well-documented projects with clear README files can say more than a CV.

What is GitHub Actions used for?

GitHub Actions runs automated workflows in the cloud whenever something happens in your repository, such as a push or a new pull request. It's most often used to run tests, check code style and deploy websites. The Actions lesson walks through writing your first workflow.

How do I make my first open-source contribution?

Find a project you use, read its CONTRIBUTING.md, and look for issues labelled good first issue. Fork the repository, make a small change on a branch and open a pull request. The forks lesson covers every step.

Is this GitHub course free?

Yes. All 20 core lessons, the 10 in-depth guides, the exercises, the quiz and the cheat sheet are free. A free GitHub account covers everything the lessons use, including public repositories, Pages and Actions minutes.

Is GitHub free to use?

Yes, for most people. Free accounts get unlimited public and private repositories, GitHub Pages and a monthly allowance of Actions minutes for private repositories. Paid plans add features for teams and companies.

What is a pull request?

A pull request proposes merging the changes on one branch into another. It shows the differences, lets teammates review and comment line by line, runs automated checks, and records the discussion with the merge.

How do I host a website on GitHub for free?

Use GitHub Pages: push your HTML, CSS and JavaScript to a repository, then enable Pages in the repository settings. Your site appears at username.github.io/repository, and the GitHub Pages lesson walks through each step.

More tutorials