Installing Git on Linux, Mac OS X and Windows. GitHub Gist: instantly share code, notes, and snippets. Download Git from Git for Windows and install it. There is a native port of Git to Windows, called mysysgit. If you use Eclipse, there's a Git client that hooks into that - egit. TortoiseGit is a standalone GUI client. Git#/GitSharp is a client for git for.NET. Mac users will hopefully be able to provide some examples for MacOS.
You can’t use Git until you make it available on your computer. There are a couple different ways you can install Git and make it available for use. The option you choose will depend on the system you are running.
In this article, I will show you how to install Git on a MAC OS, as well as how to install Git on LINUX.
A couple of things you will want to make note of while interacting with Git.
- Even if you already have Git installed it is a good idea to update to the latest version.
- All of the commands below should work, even on the older versions of Git. They may act a little differently but should work. Git is very good at preserving backward compatibility. Any version after 2.0 should work just fine.
How To Install Git on MAC OS
There are a couple of ways to install Git on MAC OS. The easiest way to do it would probably be to install the Xcode Command Line Tools. This will work on Mavericks (10.9) or above, so it should cover you. If you are running on OS older than that I would recommend you look into upgrading that first.
If your MAC OS is good to go simply run git from the Terminal the very first time. Here is what that would look like:
If it isn’t installed you will be prompted to install. If it is installed, then the above command should output the current version installed.
If you need or want a more up-to-date version, then you can install Git on MAC OS via a binary installer. There is a MAC OS Git installer that is maintained and made available for download on the Git website, at https://git-scm.com/download/mac.
Finally, a third option of installing Git on MAC OS is to install it as part of the GitHub for MAC install.
They have a GUI Git tool that has an option to install command line tools as well. You can download this tool from the GitHub for MAC website, at https://mac.github.com.
How To Install Git on Linux
More often than not you can install Git on Linux via a binary installer through the package management tool that comes with your distribution.
If you’re on Fedora or other closely related RPM-based distribution, like RHEL or CentOS, you can use dnf:
$ sudo dnf install git-all
If you happen to be on a Debian-based distribution, like Ubuntu, try using apt:
Installation For Other Unix Distributions
Gentoo
# emerge –ask –verbose dev-vcs/git
Arch Linux
openSUSE
# zypper install git
Mageia
Nix/NixOS
# nix-env -i git
FreeBSD
Solaris 9/10/11 (OpenCSW)
# pkgutil -i git
Solaris 11 Express
OpenBSD
# pkg_add git
Alpine
Slitaz
$ tazpkg get-install git
Author: Jeremy Holcombe
Growing up in Hawaii, Jeremy started his freelance writing career doing resumes, business plans, article writing, and everything in between. He now specializes in online marketing and content writing and is part of the Content Marketing Team at GreenGeeks.
Was this article helpful?
Related Articles
- FAT universal binary includes ppc, ppc64, x86 and x86-64
- Mac OS X 10.4.8 and later compatible
(including 10.5.x, 10.6.x, 10.7.x, 10.8.x, 10.9.x, 10.10.x, 10.11.x etc.) - Git translations included!
- git send-email and git imap-send work out-of-the-box, nothing more to install!
- git instaweb works out-of-the-box and includes several enhancements
- --perl-regexp is fully supported
- git subtree included
- git-credential-osx-keychain included
- Git 2.8.0 and later’s http.[<url>.]pinnedpubkey option is fully supported
- Full documentation included (man pages, html pages, pdf, release notes, howtos, tech docs etc.)
- GnuPG gpg signing utility with smart card support included!
Quick Download
Download | Size | Tag | Released | Info |
---|---|---|---|---|
git-2.11.1-osx-installer.dmg | 13 MiB | v2.11.1 | 2017-04-07 | Mac OS X 10.4+ universal installer for Git version 2.11.1 [hashes] |
git-2.10.2-osx-installer.dmg | 13 MiB | v2.10.2 | 2016-11-08 | Mac OS X 10.4+ universal installer for Git version 2.10.2 [hashes] |
git-2.9.3-osx-installer.dmg | 13 MiB | v2.9.3 | 2016-08-13 | Mac OS X 10.4+ universal installer for Git version 2.9.3 [hashes] |
Important Notes
In order to fully support SHA-256 certificates on Mac OS X 10.4 and Mac OS X 10.5 and to be more fully integratedwith the native OS X experience, this version of Git uses libcurl for all http/https/imap/imaps/smtp/smtps activitywhere libcurl has been compiled to use the OS X native Secure Transport instead of OpenSSL. (This means that Git will usethe standard root certificates from the normal system keychain locations for https/smtps/imaps authentication unless oneof the various Git certificate configuration options is used to tell it otherwise.) Please note that even though libcurl is using the OS X native Secure Transport backend, the Secure Transport backend has been enhanced so that it does not suffer from the client certificate indigestion problem.
In practice there should be no difference in use between Git built this way and Git built to use curl/OpenSSL with oneminor exception.
Secure Transport does not support a directory of certificates like OpenSSL does. An error will result if any ofthe following are used:
- http.sslCAPath (but http.sslCAInfo works just fine)
- GIT_SSL_CAPATH (but GIT_SSL_CAINFO works just fine)
- sendemail.smtpsslcertpath set to a directory (but set to a file works just fine)
- smtp-ssl-cert-path set to a directory with git send-email (but set to a file works just fine)
Additionally since the version of git imap-send that’s included is a curl-only version, there is one tinybehavioral difference to be aware of. When git imap-send is set to use a tunnel (i.e. imap.tunnel is set),an OpenSSL-using version of git imap-send will attempt to use the STARTTLS command if the other end ofthe tunnel supports it. A libcurl-using version of git imap-send will never do this. This only affects tunnels. Alldirect connections using imaps will always be encrypted.
Starting with Git version 2.8.0, an http.[<url>.]pinnedpubkey option is available.It may be set to any value supported by cURL’sCURLOPT_PINNEDPUBLICKEY option and, in addition, this version also allows it to be set to a filename ofa PEM or DER format certificate (in which case the public key is automatically extracted from the certificate) and,in the case of a PEM format file, one or more PEM format public keys and/or certificates may be combined (by simplyconcatenating them together) to form a public key pinning set similarly to the way multiple “sha256//…”values can be combined to form a public key pinning set (by concatenating them with a “;”separator).
A change log showing the various software versions and patches included in the different releases is availablehere.
Despite the name of this installer including “OS X” in its title, it supports OSversions 10.4.8 and later no matter what Cupertino’s current nom-du-jour for the OS happens to be –“Mac OS X”, “OS X”, “macOS” etc.
Git Translations
The Git translations ARE included. The installer also contains an option (off by default) to make the installedversion of Git choose its translation based on the System Preferences > International > Languages settings(instead of the LANG etc. environment variables) if desired.
Details on how to alter the translation selection behavior can be found in the release notes (installed to /opt/git/Release_Notes.rtf).
Optional Extras
Optional installs of TopGit, a curl command linetool (that uses the libcurl.dylib installed for Git), GnuPG’sgpg utility and library headers (so that a new version of Git can be built from source using thelibraries installed for Git) are included in the installer and enabled by default.
Customize the installation to turn off any of the optional installs.
Details on what gets installed and where everything goes can be found in the release notes (installed to /opt/git/Release_Notes.rtf).
Patch Sources
Various patches have been applied in order to make the build work well with Mac OS X. They are all availablefrom the Git OS X Installer repository and theREADME_PATCHES.txt filedetails them all.
Downloads
NOTE: The hashes shown below have been signed by a GPG key. Instructions for verifying the hashesusing the key can be found in the hashes.txt file.
Universal binary installers of Git (including required support libraries and executables)runnable on Mac OS X 10.4 or later are available from the following convenient download links:
SIZE | 13 MiB |
MD5 | 5c60b689a247a82db0959fa6ae6f6009 |
SHA1 | 170d4003995b3f61e9d90c4dce26d952e6a3233f |
BLOB | 7b05ded6a165654adaa523a7e36d78b12b80c626 |
SHA256 | f0ecff26a593f7586834df12091ea12f222e0741653241049b35e9584e63ef56 |
SIZE | 13 MiB |
MD5 | 4f09d2549b83163b2682122d1232119b |
SHA1 | c4bd2a83bf311dbb02be468ea101790c62f1d8ca |
BLOB | 78be32e00b9b462afd50ddef65919ab5df261eda |
SHA256 | 87f08933c79c0de8217ccb8028870a491c2c5c40ec158b91da48f8c4130c1fd6 |
SIZE | 13 MiB |
MD5 | b573c09bff0acd532c952659a64c66ca |
SHA1 | 3a0f7cd4827c267f1750e20cb11f57ca91ca0941 |
BLOB | ec857b1f42d0ce7965a91e17ea8a26b00fc5e8c5 |
SHA256 | 012f03a068551f68ea92063c113c56894b30915b3e4f7c27a8cfb7d02a278ce2 |
SIZE | 13 MiB |
MD5 | 664ef90eb20ee614723293ed58b7a025 |
SHA1 | 63422bcd9795892a5e2a5effdf974115ca5082fa |
BLOB | deded1a6d81a7c209f6e1cc6324ba6ad8f8776af |
SHA256 | 6075bf151d04e639dd4d574f05e87ff89cc203d92e26712ea8a61f9e7d720e79 |
SIZE | 13 MiB |
MD5 | 23e75353fc4e9011fb680986b9df05d9 |
SHA1 | 32864aec4b043acd7fc2d0fd89c3e9ba5b00cd60 |
BLOB | 6dc9c5008915991c64b25c3db1265191b53083f1 |
SHA256 | fa7f304c47d5695e746dcd9c8ec1f7ad781231dcb7c28cf050444fc63b4365d5 |
SIZE | 12 MiB |
MD5 | fc63a827021acc3983b9a8c25b8f44bb |
SHA1 | 0089923eb7e18efc4ecb90f7177adcd5a7f4b2d5 |
BLOB | b312d624f062f46947675b725aea195793259c93 |
SHA256 | 78a9eab23d124bbc37e162a6976623706620bd86cb3a22233d1fb68c8a0856c2 |
SIZE | 12 MiB |
MD5 | d9bbd22ce3e1f1db4ec9e5ee7ea5e867 |
SHA1 | fdadefcb27930295ea15b8299b4e61530fedd9bd |
BLOB | 7d8f07c28e2734a85959f531d3aa4b6893aff2c0 |
SHA256 | ad43775d0a419695db67f74e14607743e21e6ca210bb9b12d36e2da0e0b559e0 |
SIZE | 12 MiB |
MD5 | c9d53f8eafad3c40d0a21c31f1ef33b3 |
SHA1 | 4907db759b6eb504c8b4c4f937bb5ddae0186073 |
BLOB | 3552d31b29e8a09552913e23f71b3b51fb69ae77 |
SHA256 | c733dfcff8b4cbf54ea7448959ff1767284180426c82224914d4406b1575ff09 |
SIZE | 12 MiB |
MD5 | cd4ddf472b1389979a0ea85cec0b97f0 |
SHA1 | 7f031f322cb8296fb376c83a7cc0dd196a741ccd |
BLOB | 31fc189c04f0f391d5b1f0a8f04c6d1eb6e76d7d |
SHA256 | 8957e634b3ca65ac1e4b53b2ea447bdccbf439c538dc23b3a04d22160352fecc |
SIZE | 12 MiB |
MD5 | 7986123c8cbb0a01dd69eb2ff912886a |
SHA1 | e10ba213305a7bcb5d74f4947d418afa59aa0665 |
BLOB | 6ad8d8b259cde78e66856b7b35047e32517d0f22 |
SHA256 | 20d85f3d71389ca795696c98bdf5482d339c084c1f46817452a2918c14088629 |
Please note that older versions which were previously listed here, while they may still be available fordownload, are no longer recommended.
Git Mac Os Download Windows 10
License
Git itself is licensed under GPLv2. Some of the libraries it has been linked with have less restrictive licenses,but since GPLv2 is the most restrictive of the bunch it’s the controlling one. GnuPG is licensed underGPLv3 but is an optional install (aggregated into the installer) and does not affect the license used by Git.GnuPG is linked with libusb and libusb-compat to provide smart card support and those are LGPLv2.1 making theeffective GnuPG license restrictions still GPLv3.
The installer will display ALL licences for all software included in the installer package.
Git On Mac
See Also
Git Download For Mac
- The GNU General Public License v2.0
- The GNU General Public License v3.0