Tools: How to install Git on Linux, macOS and Windows - 2025 Update

Tools: How to install Git on Linux, macOS and Windows - 2025 Update

Installing Git in Linux

Debian

Ubuntu

OpenSUSE

ArchLinux

Gentoo

Installing Git on macOS

Installing Git on Windows

Setting up Git Now that we already explained What the Heck is Git, probably you're thinking; how can I get it on my PC? Well, then look no more, in this course we're going to show you how to Install Git on Linux, macOS or Windows. During this How To, we won't use any GUI (Graphical User Interface), instead, we will use CUI (Character User Interface) or globally known as Command Line Interface. Why? Simple, with the Graphical Front-end we loss many features that are not implemented on the available GUI's for Git. Anyways, if you would like to try a beautiful designed App for Git, which personally, I like, is GitHub Desktop. As you can notice, this App is developed by GitHub (hence the name), works perfect for managing local and remote repositories, as the only exception is the remote repo must be on GitHub. There are many alternatives for managing repos from the comfort of your PC but in this course we will focus on installing Git rather than showing all the alternatives (maybe in a next article?). On a Linux environment, the easiest way to get any software is thru the Package Manager included in your distribution (aptitude/apt, pacman and portage to name a few), Why? because all you need to do is type in a console a simple command and the Package Manager does all the job: dependencies, conflicts with other packages/software and lately, updating the software for bug fixes and new features are effortless which makes the job of maintaining everything up to date easier. Let's see how to install Git thru the main Package Managers. If you want to use a more recent version you can install the same package from the unstable repository If you don't see your Distribution (Linux Flavour) in this list, we presume that you are familiar with compiling and working with the console, you will find your way around ;) Since a few releases, you can install Apple Developer Tools on macOS which includes Git but not the latest version. If you want to know what Git version you have installed just go into a terminal and type the next command: If you have the Apple Developer Tools installed, that command will output the version of your currently installed Git, if not, probably will ask you to install the Developer Tools. Don't worry, there's another option available for all of us who don't like to have outdated software. Homebrew is a Package Manager for macOS and help us install new software hassle-free. Would you like to try? And after the installation is completed, let's use it: Git is designed and developed for Unix environments, as you know, Windows has nothing to do with Unix, the installation on Windows is a bit more fuzzy. In this How To we are not installing Git on Windows, what we are doing is, install a Linux CUI Emulator and get Git working this way.

In recent versions, Git gives the option to be run directly from Windows Command Line (cmd.exe), equaling Windows version to the Linux (or macOS), this way, the user doesn't feel much difference working with Git. We need to visit the Git for Windows and download our copy according to our computer's specifications. There's no instructions for this part of the installation... because there are no steps.. just Next, Next, Next, Next, Finish! If everything went Okay, we should be able to run Git from cmd (cmd.exe) If the output we get is the version currently installed, then, everything is ready to go. This part is universal as it works independently from the Operating System you use. The first step is setting up our username and email, this way, whenever we submit a change to the repository, we can be able to track who did what changes to the code/repo. Change the commands with your own before executing these. We can set the default text editor when we do a commit And we can test the configuration for any errors: This is the end of this part of the course, we installed Git in different Operating Systems and we set it up for initial running! Keep an eye for more courses coming for this excellent Version Control Software. For now, you can learn how to do your first commit in Git. :) Remember… Never stop programming! Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Command

Copy

# -weight: 500;">apt -weight: 500;">install -weight: 500;">git # -weight: 500;">apt -weight: 500;">install -weight: 500;">git # -weight: 500;">apt -weight: 500;">install -weight: 500;">git # -weight: 500;">apt -weight: 500;">install -weight: 500;">git # -weight: 500;">apt -weight: 500;">install -weight: 500;">git # -weight: 500;">apt -weight: 500;">install -weight: 500;">git # add--weight: 500;">apt-repository ppa:-weight: 500;">git-core/ppa # -weight: 500;">apt -weight: 500;">update # -weight: 500;">apt -weight: 500;">install -weight: 500;">git # add--weight: 500;">apt-repository ppa:-weight: 500;">git-core/ppa # -weight: 500;">apt -weight: 500;">update # -weight: 500;">apt -weight: 500;">install -weight: 500;">git # add--weight: 500;">apt-repository ppa:-weight: 500;">git-core/ppa # -weight: 500;">apt -weight: 500;">update # -weight: 500;">apt -weight: 500;">install -weight: 500;">git # zypper -weight: 500;">install -weight: 500;">git # zypper -weight: 500;">install -weight: 500;">git # zypper -weight: 500;">install -weight: 500;">git # -weight: 500;">pacman -S -weight: 500;">git # -weight: 500;">pacman -S -weight: 500;">git # -weight: 500;">pacman -S -weight: 500;">git # emerge --ask --verbose dev-vcs/-weight: 500;">git # emerge --ask --verbose dev-vcs/-weight: 500;">git # emerge --ask --verbose dev-vcs/-weight: 500;">git $ -weight: 500;">git --version $ -weight: 500;">git --version $ -weight: 500;">git --version $ /usr/bin/ruby -e "$(-weight: 500;">curl -fsSL https://raw.githubusercontent.com/Homebrew/-weight: 500;">install/master/-weight: 500;">install)" $ /usr/bin/ruby -e "$(-weight: 500;">curl -fsSL https://raw.githubusercontent.com/Homebrew/-weight: 500;">install/master/-weight: 500;">install)" $ /usr/bin/ruby -e "$(-weight: 500;">curl -fsSL https://raw.githubusercontent.com/Homebrew/-weight: 500;">install/master/-weight: 500;">install)" $ -weight: 500;">brew -weight: 500;">install -weight: 500;">git $ -weight: 500;">brew -weight: 500;">install -weight: 500;">git $ -weight: 500;">brew -weight: 500;">install -weight: 500;">git $ -weight: 500;">git --version $ -weight: 500;">git --version $ -weight: 500;">git --version $ -weight: 500;">git config --global user.name "Your Name" $ -weight: 500;">git config --global user.email [email protected] $ -weight: 500;">git config --global user.name "Your Name" $ -weight: 500;">git config --global user.email [email protected] $ -weight: 500;">git config --global user.name "Your Name" $ -weight: 500;">git config --global user.email [email protected] $ -weight: 500;">git config --global core.editor vim $ -weight: 500;">git config --global core.editor vim $ -weight: 500;">git config --global core.editor vim $ -weight: 500;">git config --list $ -weight: 500;">git config --list $ -weight: 500;">git config --list