← Courses

IND 504 · 2 credits

Course Outline

Git & GitHub

Git is how software engineers save work, experiment safely, and collaborate without overwriting each other. Starting from zero, you will build a mental model of repositories, commits, and branches, then learn the everyday workflow: staging, committing, diffing, undoing mistakes, merging, and resolving conflicts. You finish with GitHub, pull requests, rebase, and the recovery tools that make almost any mistake reversible.

What you will learn

  • Create a repository and record clean, well-described commits
  • Explain the working directory, staging area, and repository, and move changes between them
  • Undo anything: restore files, reset commits, amend, revert, and recover lost work with reflog
  • Create branches, merge them, and calmly resolve merge conflicts
  • Collaborate on GitHub with clone, push, pull, forks, and pull requests
  • Keep history tidy with rebase, shelve work with stash, and hunt bugs with bisect

Course outline

Unit 1Why version control

  • 1-1The problem Git solves4 checks · 9 min
  • 1-2Repos, commits, and history4 checks · 10 min

Unit 2Your first repository

  • 2-1git init and git status4 checks · 9 min
  • 2-2The staging area3 checks · 12 min
  • 2-3git commit4 checks · 11 min

Unit 3Reading the history

  • 3-1git log and git show4 checks · 10 min
  • 3-2git diff5 checks · 12 min
  • 3-3Writing good commit messages3 checks · 8 min
  • 3-4git blame: who touched this line?3 checks · 8 min

Unit 4Undoing things

  • 4-1git restore: throwing away and unstaging4 checks · 9 min
  • 4-2git reset: rewinding commits3 checks · 11 min
  • 4-3amend, revert, and the reflog safety net2 checks · 11 min

Unit 5Branches

  • 5-1What a branch really is4 checks · 11 min
  • 5-2Creating and switching branches3 checks · 9 min
  • 5-3Merging: fast-forward vs true merge4 checks · 12 min

Unit 6Merge conflicts

  • 6-1Why conflicts happen3 checks · 8 min
  • 6-2Resolving a conflict, step by step3 checks · 10 min

Unit 7GitHub and remotes

  • 7-1Remotes, GitHub, and git clone4 checks · 11 min
  • 7-2push and pull2 checks · 10 min
  • 7-3fetch vs pull3 checks · 9 min

Unit 8Working on a team

  • 8-1Branch, push, pull request3 checks · 10 min
  • 8-2Code review basics3 checks · 10 min
  • 8-3.gitignore and README5 checks · 12 min

Unit 9Rebase and history hygiene

  • 9-1Rebase vs merge3 checks · 10 min
  • 9-2Interactive rebase, gently3 checks · 9 min
  • 9-3cherry-pick and detached HEAD3 checks · 9 min

Unit 10Git in real life

  • 10-1stash and tags3 checks · 10 min
  • 10-2bisect and your cheatsheet4 checks · 13 min

Practice while you learn

Use Hack University's public online code editor when you want to run code online before committing to the full curriculum. The browser compilers are free for quick syntax checks, exercises, and interview practice in an isolated sandbox environment.