Git and GitHub
Learn Git from first principles: record and undo changes, see how Git works inside, branch and merge, work with GitHub over SSH, collaborate through pull requests and keep secrets out.
Modules
8
Lessons
58
Level
Beginner
Project
Reviewed by a mentor
About This Course
Every DevOps job starts in a Git repository. This course takes you from saving your first commit to working like a team member on GitHub: branching, resolving conflicts, opening pull requests and responding to review. You finish by getting a real pull request reviewed and merged.
You'll Be Able To
- Explain what version control solves and how Git records history as commits.
- Stage, commit, inspect and undo changes confidently from the command line.
- Create, merge and delete branches, and resolve merge conflicts by hand.
- Connect a local repository to GitHub over SSH and keep the two in sync.
- Open, review and merge pull requests using a protected main branch.
- Contribute to someone else's project through a fork while keeping secrets out of Git.
What's Inside
- 1
Version control
5 lessons
See why every team keeps its work in version control and how Git differs from GitHub, then install Git and set it up with your name, email, editor and the main branch.
- 2
Your first repository
10 lessons
Turn a folder into a Git repository and build a clean history: stage and commit changes, write clear messages, read the log and diffs, and keep junk out with .gitignore.
- 3
How Git works
4 lessons
Open up Git to see how commits, trees and blobs store your project, where commit hashes come from, what HEAD and branches really are, and what lives inside .git.
- 4
Undoing things
7 lessons
Undo mistakes without losing work: discard and unstage changes, fix your last commit, reverse a shared commit, move back with reset, rescue lost commits and stash work aside.
- 5
Branches and merging
9 lessons
Work on several things at once with branches: create and switch them, merge them fast-forward or three-way, resolve conflicts, rebase your own work and tag releases.
- 6
Working with GitHub
8 lessons
Put your work on GitHub and keep it in sync: create and secure your account, connect over SSH, add a remote, push, clone, fetch and pull, and read tracking branches.
- 7
Collaborating
9 lessons
Work the way teams do on GitHub: pick a branching strategy, open, review and update pull requests, protect main, contribute through forks, and track work with issues and CODEOWNERS.
- 8
Repository hygiene
6 lessons
Keep repositories clean and safe: write a README a stranger can follow, keep secrets out and respond when one leaks, use GitHub's push protection, skip junk files and add a licence.