In this lesson, you will learn how to download and install Git so that your computer can finally speak the language of version control.
Why do we need to install Git?
Up until now, we have talked about the concepts of version control—like atomic commits and establishing a source of truth. However, your computer doesn’t automatically know how to track file history or manage branching. By installing Git, you are adding a specialized tool to your computer's "toolbox" that allows you to run Git commands directly from your terminal or command prompt.
How to get started
The process is straightforward:
- Visit the official website: Go to git-scm.com.
- Download the installer: The website will automatically detect your operating system (Windows, macOS, or Linux) and provide a download button.
- Run the installer: Follow the default prompts. For most beginners, the default settings provided by the installer are perfect for getting started.
- Verify the installation: Once the installation finishes, open your terminal (Command Prompt on Windows, Terminal on macOS) and type the following command:
git --version
If everything went correctly, you will see a response like git version 2.x.x. This confirms that your machine is now ready to track your projects!
A note on the command line
After installation, Git doesn't provide a big, colorful app icon to click. Instead, it lives inside your terminal. This is a good thing! By using the command line, you are interacting directly with the "source of truth" for your files, ensuring that your commits are precise and your project history remains clean.
You now have the engine installed. In the next steps of our journey, we will start using this engine to initialize our very first repositories and begin recording our work history.
Key Takeaway: Installing Git provides the command-line engine necessary to transform your local computer into a professional-grade version control environment.