Find a course
Age level: Adults & professionals (18+)BeginnerTechnology & Programming

Git and GitHub Basics

Track changes, branch safely and collaborate with pull requests

⏱ 2 h5 modules · 12 lessons75 practice questionsFinal exam: 20 questions
Included with this course

Your certificate for this course

Finish the 12 lessons (about 2 h) and pass the 20-question final exam. Your Certificate of Completion is ready the moment you pass.

  • Your name and this course titlePrinted in classic diploma typography
  • Grade: Pass, Merit or DistinctionOn the gold seal, with your final score
  • Unique ID and QR codeAnyone can verify it in seconds
  • Score report PDFModule-by-module results and exam score
  1. Lessons12 lessons
  2. Final exam20 questions · 70% to pass
  3. CertificatePDF + score report

What you will learn

  • Explain what version control is and how Git and GitHub differ
  • Install and configure Git, then create a repository and make commits
  • Describe the working directory, staging area and repository, and move changes between them with add, restore and commit
  • Write clear commit messages and inspect history with log, show and diff
  • Create, switch and merge branches, and resolve merge conflicts
  • Undo mistakes safely with restore, amend, revert and reset, and keep files out of Git with .gitignore
  • Connect to GitHub with clone, push, fetch and pull, and collaborate through forks and pull requests
  • Follow the GitHub flow and use tags, releases and README files

About this course

If you've ever had a folder full of files named report_final_v2_REAL.docx, you already understand the problem Git solves. Git is a version control system: it records snapshots of your project so you can see what changed, when and why, go back to any earlier state, and work on several ideas at once without breaking what already works. GitHub is a website that hosts Git repositories online so people can share code, review each other's changes and collaborate.

Git is used by almost every software team in the world, and increasingly by data analysts, writers, designers and researchers. Yet many people learn it by memorizing a few commands and panicking when something unexpected happens. This free course builds the mental model first, so the commands make sense.

You'll install and configure Git, create a repository, and learn the three areas every change passes through: the working directory, the staging area and the commit history. You'll write useful commit messages, ignore files that don't belong in a repository, and learn safe ways to undo mistakes. Then you'll create branches, merge them, and resolve merge conflicts calmly.

In the second half you'll connect to GitHub: push and pull, clone and fork, open a pull request, review code, and follow the GitHub flow that many teams use daily. You'll finish with tags, releases, README files and habits that keep repositories healthy and secrets out of them.

The course is for complete beginners and for people who use Git but don't feel confident with it. No programming experience is required. Every lesson mixes short explanations with realistic scenarios and quick checks, and you can earn a free certificate of completion by passing the final exam.

Syllabus

  1. Getting Started with Version Control

    Why version control exists, how Git and GitHub fit together, and how to install and configure Git on your computer.

    1. What Is Version Control?9 min
    2. Installing and Configuring Git10 min
  2. Everyday Git on Your Computer

    Create a repository, move changes through the staging area into commits, read history and diffs, ignore files and undo mistakes safely.

    1. Your First Repository11 min
    2. Good Commits, History and Diffs11 min
    3. Ignoring Files and Undoing Mistakes13 min
  3. Branching and Merging

    Work on several ideas at once with branches, combine them with merges, and resolve merge conflicts without panic.

    1. Branches: Parallel Lines of Work11 min
    2. Merging Branches10 min
    3. Resolving Merge Conflicts11 min
  4. Working with GitHub

    Connect a local repository to GitHub, push, clone, fetch and pull, then propose and review changes with pull requests.

    1. Remotes: Push, Clone, Fetch and Pull13 min
    2. Pull Requests and Code Review12 min
  5. Collaboration Workflows and Good Habits

    Follow the GitHub flow, contribute through forks and issues, and keep repositories documented, versioned and secure.

    1. GitHub Flow, Forks and Issues11 min
    2. READMEs, Releases and Repository Hygiene12 min
  6. Final exam and certificate

    20 questions drawn from a pool of 33. Score 70% or more to pass; retakes get a fresh set of questions.

Try a sample question

Which of these is NOT something Git helps you do?

  1. See which lines changed between two versions of a file
  2. Restore a project to how it looked last Tuesday
  3. Automatically back up your files to the cloud every hour
  4. Work on an experimental idea without breaking the working version
Show the answer

Answer: C. Automatically back up your files to the cloud every hour

Git records history on your own computer only when you commit; it doesn't back anything up by itself. Pushing to a remote such as GitHub is what puts a copy elsewhere, and even then only when you choose to push.

Version control
A system that records changes to files over time so you can review history and restore earlier versions.
Git
A free, distributed version control system that tracks snapshots of a project on your own computer.
GitHub
An online service that hosts Git repositories and adds collaboration features like pull requests and issues.
Repository
A project folder tracked by Git, including its full history stored in a hidden .git directory.
Working directory
The files you see and edit on disk, in their current state.
Staging area
Also called the index: the set of changes selected to go into the next commit.

Frequently asked questions

What is the difference between Git and GitHub?

Git is free, open-source software that tracks changes on your own computer. GitHub is an online service that hosts Git repositories and adds collaboration tools such as pull requests, issues and code review. You can use Git without GitHub, and alternatives like GitLab and Bitbucket host Git repositories too.

Do I need to know how to program to use Git?

No. Git tracks any text files: code, documentation, configuration, research notes or a book manuscript. It works best with plain text, because it can show line-by-line differences, but it can store any file.

Should I use the command line or a graphical app?

Learn the core commands in a terminal first, because every tool, tutorial and error message is described in those terms. Afterward, use whatever is comfortable: VS Code, GitHub Desktop and other apps run the same Git commands underneath.

What is the difference between git fetch and git pull?

git fetch downloads new commits from the remote but doesn't change your files or branches. git pull fetches and then immediately merges (or rebases) those commits into your current branch. Fetch is the safe way to look before you combine.

I committed a password. Is deleting the file enough?

No. The secret is still in the history, and if it was pushed, assume it has been seen. Revoke or rotate the credential immediately, then remove it from history with a dedicated tool if needed. Rotating the secret is the step that actually protects you.

Is main the same as master?

Yes, they're just different names for a repository's default branch. Older repositories often use master; GitHub and many teams now use main for new repositories. Git itself treats the name like any other branch.

Is this certificate an official GitHub certification?

No. It's a certificate of completion from this course showing that you passed its exam. GitHub offers its own paid certification exams if you need a vendor credential.

Sources and further reading

Related courses

Adults & professionalsBeginner

JavaScript for Beginners

Variables, functions, arrays, objects, the DOM and async code

Technology & Programming
2 h 10 min12 lessonsCertificate
Adults & professionalsBeginner

Python for Beginners

Write real programs with variables, loops, lists, dictionaries and functions

Technology & Programming
2 h 15 min12 lessonsCertificate
TeensBeginner

Python for Teens

Write real programs: games, quizzes and calculators from your first line of code

Technology & Programming
1 h 55 min10 lessonsCertificate
TeensBeginner

Make Games with JavaScript

Code real browser games with variables, loops, canvas drawing, keys and collisions

Technology & Programming
2 h11 lessonsCertificate
University studentsIntermediate

Regular Expressions

Match, extract and replace text with regex in JavaScript, Python and your editor

Technology & Programming
2 h 45 min12 lessonsCertificate
KidsBeginner

Coding for Kids

Algorithms, loops, if-then, variables and bug hunting, then write real JavaScript

Technology & Programming
1 h7 lessonsCertificate