Getting Started with Git — Module Recap
Module 01 is complete. You went from no Git installed to a working repository with a two-commit history. Here is everything the module covered in one place.
What you learned
Section titled “What you learned”What version control is — A system that tracks the complete history of a project as a series of snapshots, recording what changed, when, who made the change, and why. Git is the distributed VCS the entire industry uses.
Installing and configuring Git — git --version to check installation. Three essential config values: user.name, user.email, and init.defaultBranch. The --global flag applies configuration to all repositories on the machine.
Initializing a repository — git init turns any folder into a Git repository by creating a .git directory. The repository exists entirely on your machine.
The three-area model — Working tree (your files), staging area (draft of your next commit), and repository (permanent history in .git). Files move through these areas as you git add and git commit.
Making commits — git add stages files; git commit -m saves a permanent snapshot with a message and a unique hash. Every commit points to its parent, forming a chain of history.
Command reference
Section titled “Command reference”| Command | What it does |
|---|---|
git --version | Check the installed Git version |
git config --global user.name "Name" | Set your name for all commits on this machine |
git config --global user.email "email" | Set your email for all commits on this machine |
git config --global init.defaultBranch main | Set the default branch name to main |
git config --global --list | Review all global configuration values |
git init | Initialize a new repository in the current folder |
git status | Show the current state of the working tree and staging area |
git add <file> | Stage a specific file |
git add . | Stage all changes in the current directory |
git commit -m "message" | Create a commit with the staged changes |
git log | Show the commit history on the current branch |
What’s next — Commits and History
Section titled “What’s next — Commits and History”Module 02 goes deeper into the tools you use every day to understand what is happening in your repository:
git status— reading exactly what Git reports and whygit diff— seeing line-by-line what changed in unstaged and staged files- The staging area in depth — staging partial files, unstaging, and checking what is staged
- Writing commit messages that communicate intent, not just action
git log— flags and formats for reading history usefully
The commands from this module (git add, git commit, git status) stay with you throughout the course — you will use them dozens of times. Module 02 builds the skills to use them more deliberately.