Chapter 11
Where to Go Next
Use Git on Your Own Machine
Git becomes useful when it protects files that belong to you on a machine you control. The course assessment is finished; this lesson is the handoff from a disposable practice
The course terminal ran real Git on a disposable
Check before installing anything
Open a terminal on your computer. On
The option --version asks Git to print its installed version and exit without changing any files or settings. Run:
git --version
If the terminal prints a line beginning with git version, Git is already available and you can skip installation. The exact number does not need to match the course terminal. If the terminal says it cannot find git, use the directions for your
The official Git installation page for macOS lists several supported routes. If you do not already use a package manager, Apple’s Xcode
xcode-select --install
If Homebrew is already installed on your Mac, you can instead ask that package manager to install Git. There is no need to install Homebrew solely for this course:
brew install git
Choose one route, finish its installer, then open a new Terminal window.
The official Git installation page for Windows offers maintained Setup programs for x64 and ARM64 computers. Use the Setup program that matches your computer and follow its installer. This installs Git and Git Bash; it does not require an account on a hosting service.
If the Windows package manager winget is already available, the same official page gives this alternative. The words after winget install identify the maintained Git package and its source:
winget install --id Git.Git -e --source winget
Choose either the Setup program or the winget route, finish the installation, then open a new PowerShell or Git Bash window.
The official Git installation page for Linux recommends using your distribution’s package manager. A package manager installs software from the repositories maintained for your Linux distribution. These commands use sudo, which asks for permission to make a system-wide change.
On Debian or Ubuntu, run:
sudo apt-get install git
On a current Fedora release, run:
sudo dnf install git
For Arch, openSUSE, Alpine, and other distributions, use the command listed for your distribution on the official page. Finish the installation, then open a new terminal window.
Run git --version again in the new terminal. A version line confirms that the
Expect an ordinary pager
The course terminal often displayed the whole result of git log at once. On your own computer, a long result may open in a pager, a small viewer that lets you read one screen at a time. A pager may show a colon or (END) at the bottom instead of the usual shell prompt.
The pager is not a frozen terminal and Git is not still changing the repository. Press q to quit the pager and return to the prompt. The letter stands for quit. You do not need to close the terminal or interrupt Git.
Your terminal may use different colors, spacing, or a different pager. Keep reading the meaning rather than trying to match the course screen character for character: the current branch, the outstanding paths, the commit subjects, and the relationships between refs are the useful evidence.