GitHub
git
windows
MacOS
linux
Written by:
Git is an essential tool for version control, widely used in the software development industry. Installing Git on your computer allows you to manage your code efficiently, collaborate with others, and maintain a history of your projects.
💡 This article is about installing git, not using git, click here if you are looking for a comprehensive guide on how to use git or how to clone a github repository.
This article provides a step-by-step guide to installing Git on Windows, macOS, and Linux.
.exe
file and double-click to run it.1git config --global user.name "Your Name" 2git config --global user.email "your.email@example.com"
1/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
1brew install git
.dmg
file and follow the installation instructions.1git config --global user.name "Your Name" 2git config --global user.email "your.email@example.com"
1sudo apt update
1sudo apt install git
1sudo dnf install git
1sudo yum install epel-release
1sudo yum install git
1git config --global user.name "Your Name" 2git config --global user.email "your.email@example.com"
After installing Git, verify that it is installed correctly by running the following command in your terminal or command prompt:
1git --version
You should see the installed Git version number.
Git and GitHub are very different things: The first one is a free and open-source technology to track your project changes, and the second one is a for-profit company that uses Git (like many other companies like Gitlab and Bitbucket). Nevertheless, we strongly recommend you understand what is Github and how to build your coding reputation on it because it will help you a lot throughout your career.
By following these steps, you should have Git installed on your computer, regardless of the operating system. Configuring your Git user information ensures that your commits are attributed to you correctly. With Git set up, you can start managing your projects more efficiently and collaborate with others seamlessly.