Skip to content

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 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 Gitgit --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 repositorygit 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 commitsgit 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.

CommandWhat it does
git --versionCheck 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 mainSet the default branch name to main
git config --global --listReview all global configuration values
git initInitialize a new repository in the current folder
git statusShow 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 logShow the commit history on the current branch

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 why
  • git 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.