DEV Community

Gabor Szabo
Gabor Szabo

Posted on • Originally published at code-maven.com

Download and install git on Linux, Windows, and macOS

This time we are going to talk about downloading and installing git. There is going to be a separate episode on how to install on Windows, this is some generic overview.

All the slides and the specific slides about git installation.

Linux

For RedHat, CentOS and similar yum-based Linux distributions:

sudo yum install git-core
Enter fullscreen mode Exit fullscreen mode

For Ubuntu, Debian, and other apt- or deb-based Linux distributions:

sudo apt-get install git-core
Enter fullscreen mode Exit fullscreen mode

You could also download the latest version of git from git-scm, but usually you are better off using
the version that is packaged by the vendor of your Linux distribution. It is usually better to use the standard package-management system
of your Linux distribution.

Of course, if you have a really, really old version of Linux then, ..., then yous should probably upgrade your Linux.

Well even in older versions of Linux you are still better off using git that was packaged by the vendor.

Windows

For Windows there will be a separate video and article, but I'd recommend downloading git from git-scm.

Apple macOS

For macOS you could also use the package from git-scm, but probably a better way is to
first install Homebrew and then that install git using:

brew install git
Enter fullscreen mode Exit fullscreen mode

In case you are not familiar with it, Homebrew is a package management system for Mac OSX. It is like apt or yum for Linux. It's a tool to install all kinds of open source projects. You'll probably
need a lot more tools than just git, so that's why it is probably better to use Homebrew for git as well.

Top comments (1)

Collapse
 
mjgardner profile image
Mark Gardner

It’s called macOS now, and if you run git from the Terminal on a new system it will offer to download it and the rest of the command line developer tools for you. You can also go the Homebrew route but it’s another updater to run and possibly automate.