Introduction to Git and GitHub
What Git actually is
Git is a distributed version control system: every clone contains the full history, so commits, branches, and diffs work offline. GitHub is a hosting and collaboration platform built around Git - it adds issues, pull requests, Actions, permissions, and a web UI. The single most common trap is treating the two names as synonyms, or assuming a commit is automatically published to GitHub.
The three states and the basic flow
A file moves through three areas: the working directory (modified), the staging area / index (staged with git add), and the local repository (committed with git commit). Only git push sends commits to a remote such as origin. git pull is git fetch followed by a merge (or rebase, if configured). git clone creates a local copy and automatically sets up origin plus remote-tracking branches.
Branching and history
A branch is a movable pointer to a commit; HEAD points at the branch you currently have checked out. Each commit is identified by a SHA hash and records a snapshot plus a pointer to its parent, which is how Git builds history graphs and detects merge conflicts.
GitHub at a glance
Know the account plans (Free, Pro, Team, Enterprise) at a conceptual level, that public repositories are visible to everyone and private ones are restricted by permissions, and that collaboration happens through issues and pull requests rather than emailing patches.
Worked rule of thumb
Memorize the publish chain: edit → git add → git commit → git push. If a question says a colleague cannot see your work, the answer is almost always "the commits were never pushed," not "the commits were never made."