Skip to main content

Git and GitHub

Learn Git and GitHub from first commit to team workflow: branching, merging, pull requests, secrets, CI, and recovery tools for when things break.

~3.5 hours
12 Topics
Hands-on Scenarios

What You'll Learn

Understanding Why Version Control Exists

It is 6 PM on a Friday at acme-shop. Two engineers have spent an hour editing the same deploy script, and one of them just emailed the other a file...

Installing and Configuring Git

How to install Git and set your identity Install Git with your system package manager, then tell it who you are once.

Working with the Three Areas and the Daily Workflow

Working directory, staging area, and repository Every change moves through three places: the working directory where you edit, the staging area where...

Connecting Git to GitHub

How to authenticate with SSH or HTTPS GitHub must verify who you are before you push, and there are two common ways.

Branching, Merging and Resolving Conflicts

How branches work A branch is an independent line of development, so you can build a feature without touching stable code.

Undoing Changes Safely

How to undo at every stage The right undo command depends on how far the change has traveled. Before staging, discard it. After staging, unstage it.

Skills You'll Master

GITGITHUBVERSION-CONTROLBRANCHINGPULL-REQUESTS

Curriculum Index12 topics

1

Understanding Why Version Control Exists

It is 6 PM on a Friday at acme-shop. Two engineers have spent an hour editing the same deploy script, and one of them...

2

Installing and Configuring Git

How to install Git and set your identity Install Git with your system package manager, then tell it who you are once.

3

Working with the Three Areas and the Daily Workflow

Working directory, staging area, and repository Every change moves through three places: the working directory where...

4

Connecting Git to GitHub

How to authenticate with SSH or HTTPS GitHub must verify who you are before you push, and there are two common ways.

5

Branching, Merging and Resolving Conflicts

How branches work A branch is an independent line of development, so you can build a feature without touching stable...

6

Undoing Changes Safely

How to undo at every stage The right undo command depends on how far the change has traveled.

7

Protecting Secrets with .gitignore

What belongs in .gitignore A .gitignore file lists the files Git should never track.

8

Collaborating with Pull Requests and Branch Protection

How the pull request flow works A pull request (PR) is how teams move code from a feature branch into main.

9

Running Basic CI with GitHub Actions

What CI does on every pull request Continuous integration (CI) means every push and PR automatically triggers a fresh...

10

Exploring Advanced Git for When Things Break

Skip this topic on your first read. Come back when you need to clean up history, recover lost work, or hunt down a bug.

11

Hands-On Lab: Your First Team Workflow

📌 Remember: Do every step in order. Together they cover the workflow real teams use every working day, including the...

12

Quick Reference and Common Mistakes

Quick reference Common mistakes Committing directly to main on a team with branch protection skips the review and CI...

Career Impact

Roles that use the skills in this module.

  • DevOps Engineer

  • Site Reliability Engineer

  • Cloud Engineer

See how this is asked in interviews

Practice on the Coding Sheet

Not a software engineer sheet. Every problem comes from real DevOps, SRE, Platform and Cloud interviews, from your first script to a system you build yourself.

Open the Coding Sheet

Frequently Asked Questions

Git is the version-control tool that runs on your computer and records the history of your files. GitHub is a website that hosts Git repositories and adds pull requests, issues, and automation. You can use Git without GitHub, but not GitHub without Git.

Use git revert with the commit hash. It adds a new commit that cancels the change and leaves history intact, so teammates who already pulled are not affected. Avoid git reset on pushed commits because it rewrites history.

No. The password stays in every earlier commit. Rotate the credential first, treating it as public, then rewrite history only if you must. Deleting the file in a new commit does not remove it from history.

Merge is safer and keeps the full record of what happened. Rebase gives a straight-line history but changes commit hashes, so use it only on commits nobody else has pulled. Pick one convention for your team and stay consistent.