GitHub Tutorial
Learn GitHub step by step: 36 lessons in 9 chapters with examples, quizzes, diagrams and projects.
Start learning →
of lessons completed
Getting Started
- What Is GitHub and Why Developers Use It Understand what GitHub is, how it differs from Git, what a remote repository does, and how the pieces of the platform fit together before you write a single command.
- Your GitHub Account and Profile Create a GitHub account, choose a username, protect it with two-factor authentication, set your commit email correctly and build a profile README that presents your work.
- Creating Your First Repository Create your first GitHub repository on the website, clone it, make a commit and push it, or push an existing local project. Learn what each step does and the usual errors.
- Authentication: SSH Keys, Tokens and Credential Managers Learn how Git authenticates to GitHub over HTTPS and SSH, generate an Ed25519 key, use fine-grained personal access tokens safely and fix permission denied errors.
- The GitHub CLI (gh) Use the gh command-line tool to sign in, create and clone repositories, open and review pull requests, manage issues, run API calls and write your own aliases.
Repositories and Collaboration
- README, License and .gitignore Write a useful README, choose an open-source license, add a .gitignore, and include community health files so visitors can understand, trust and contribute to your project.
- Branches on GitHub Work with branches on GitHub: the default branch, creating and renaming branches, naming conventions, comparing branches, tags, and cleaning up branches after merge.
- Forks and Keeping Up With Upstream Learn what a fork is, when to fork instead of branch, how to add an upstream remote, sync your fork with the original repository and contribute changes back safely.
- Collaborators, Roles and Repository Permissions Invite collaborators, understand the repository roles (read, triage, write, maintain, admin), choose public, private or internal visibility, and apply least privilege.
- Organizations and Teams Create a GitHub organization, understand owners and members, build teams with nested structure, set base permissions and defaults, and use a .github repository for shared files.
Pull Requests and Reviews
- Pull Requests: The Basics Open your first pull request: choose base and head, write a clear title and description, link issues with keywords, use drafts, push updates and read the Conversation tab.
- Reviewing Pull Requests Review code on GitHub: line comments, suggested changes, approve, comment or request changes, resolve conversations, re-request review, and what makes a review useful.
- Merge Methods and Resolving Conflicts Compare the three ways to merge a pull request on GitHub, learn what each does to history, set repository defaults, use auto-merge and merge queues, and resolve conflicts.
- Branch Protection, Rulesets and CODEOWNERS Protect your main branch: require reviews and status checks, block force pushes, use rulesets, and assign automatic reviewers with a CODEOWNERS file.
Issues, Projects and Discussions
- Issues: Tracking Work on GitHub Use GitHub Issues to track bugs, tasks and ideas: write a useful issue, mention people, assign work, use task lists and sub-issues, link pull requests and search with filters.
- Labels, Milestones and Issue Templates Organize issues with labels and milestones, then guide reporters with issue templates and YAML issue forms, a config file for contact links and a pull request template.
- GitHub Projects: Tables, Boards and Roadmaps Plan and track work with GitHub Projects: create a project, add issues and pull requests, use custom fields, switch between table, board and roadmap views, group, filter and automate.
- Discussions, Wikis and Community Features Know where each conversation belongs: GitHub Discussions for questions and ideas, issues for work, wikis for docs, plus stars, watching, sponsors and community moderation tools.
GitHub Actions
- GitHub Actions: Your First Workflow Write your first GitHub Actions workflow: the YAML file, events that trigger it, jobs, steps and where to read the logs. Includes a trigger matcher you can run.
- Jobs, Steps, Runners and Matrices Understand how GitHub Actions jobs, steps and runners fit together: needs, outputs, conditions, timeouts, concurrency and the build matrix, with a matrix expander to try.
- Secrets, Variables and Expressions Store credentials safely with Actions secrets, share settings with variables, and use contexts and ${{ }} expressions, GITHUB_TOKEN and OIDC. With a runnable expression stand-in.
- Caching, Artifacts, Reusable Workflows, Environments Speed up and organize GitHub Actions: dependency caching with keys, artifacts between jobs, reusable workflows, composite actions and deployment environments with approvals.
Security Features
- Dependabot and Dependency Security Use the dependency graph, Dependabot alerts, security updates and version updates to keep dependencies safe. Configure dependabot.yml and try a version-range checker.
- Code Scanning and Secret Scanning Find bugs and leaked credentials automatically: CodeQL code scanning, alerts on pull requests, secret scanning and push protection. Try a runnable secret-detector stand-in.
- Security Policy, Advisories and Supply-Chain Safety Publish a SECURITY.md, handle private vulnerability reports and advisories, and harden your supply chain: pinned actions, minimal token permissions, SBOMs and attestations.
Pages, Packages and Releases
- GitHub Pages: Hosting a Website Publish a static site with GitHub Pages: user, organization and project sites, branch or Actions publishing, custom domains with HTTPS, Jekyll basics and limits. Includes a URL calculator.
- GitHub Packages and Container Registry Publish and install packages with GitHub Packages: npm, Maven and NuGet registries and the Container registry ghcr.io. Authentication, visibility, and a publish workflow.
- Releases, Tags and Semantic Versioning Ship versions with GitHub Releases: Git tags, semantic versioning, release notes and automatically generated changelogs, assets and pre-releases, with a version-bump calculator.
Administration and API
- Organizations, Teams, Roles and CODEOWNERS Manage who can do what on GitHub: organizations, teams, repository roles, outside collaborators, custom roles and CODEOWNERS review rules, with a CODEOWNERS matcher you can run.
- Branch Protection and Rulesets Protect important branches and tags with branch protection rules and repository rulesets: required reviews, status checks, signed commits, merge queue and bypass lists.
- The GitHub API, CLI and Webhooks Automate GitHub: call the REST and GraphQL APIs, authenticate with tokens and Apps, use the gh CLI, handle pagination and rate limits, and receive and verify webhooks.
Projects and Practice
- Project: A Complete CI Pipeline Build a complete continuous-integration pipeline for a Node project with GitHub Actions: lint, test matrix, caching, coverage artifacts, a required gate job and a runnable plan checker.
- Project: Set Up an Open-Source Repository Turn a bare repository into a welcoming open-source project: README, license, CONTRIBUTING, code of conduct, issue and PR templates, labels, security policy and a health checker.
- Project: Automated Release Pipeline Build an automated release pipeline: tag a version, verify it, build artifacts, publish to npm and ghcr.io with provenance, create release notes from labels and require approval.
- Practice: GitHub Scenarios and Decisions Test what you learned with realistic GitHub scenarios: choose the right feature for security, automation, releases and administration problems, with answers and a self-scoring drill.
- Practice: Troubleshooting GitHub Actions Workflows Diagnose broken GitHub Actions workflows: invalid YAML, workflows that never start, permission errors, missing secrets, cache and artifact problems, stuck required checks, with a log diagnoser.