← Back

Complete Git & GitHub Course

End‑to‑end Git & GitHub workflow: init, commits, branching, collaboration, PRs.

gitgithubvcsbasicsUpdated 2025-09-01

Overview

  • Git is a distributed version control system tracking snapshots (commits).
  • GitHub hosts remote repositories enabling collaboration via pull requests.

Core Commands

  • git init — create repo
  • git status — view changes
  • git add . — stage
  • git commit -m 'msg' — snapshot
  • git log --oneline --graph — history
  • git branch / git switch — navigate branches
  • git merge / git rebase — integrate
  • git push / pull / fetch — sync remotes

Branch Model

  • Feature branches isolate work.
  • Main stays deployable.
  • Use pull requests for review & CI.

Minimal Example

  • git init
  • echo 'hello' > README.md
  • git add README.md
  • git commit -m 'init'
  • git remote add origin <url>
  • git push -u origin main