Introduction: Installing Git is the first step to using it for version control. The installation process varies slightly depending on your operating system.
Installing Git:
Windows:
macOS:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install git
git --version
Linux:
sudo apt-get install git
git --version
Configuring Git: After installing Git, you need to configure your user name and email address.
# Set your name
git config --global user.name "Your Name"
# Set your email
git config --global user.email "your.email@example.com"
Conclusion: Installing and configuring Git correctly ensures that your commits are associated with the right identity. In the next lesson, we’ll set up your Git environment to make using Git more convenient.