0%

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 to that personal workspace.

The course terminal ran real Git on a disposable machine. Git on your own computer uses the same , , , and remotes, but the installation, terminal, version, and exact messages can differ. Those differences are ordinary. They do not mean that you learned the wrong tool.

Check before installing anything

Open a terminal on your computer. On , the application is named Terminal. On Windows, PowerShell is a suitable place to begin. Linux desktop environments usually provide an application named Terminal or Console.

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 below.

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 can find Git. If it still cannot, return to the official page for your operating system and check that the installer finished before trying unrelated fixes.

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.