install

Installation Website

View the Project on GitHub dhsouthbend/install

Git

Git is a distributed version control system used to manage changes to text files.

OS/X

On OS/X, git is part of the xcode command line tools. This is easy to install, but it can take a long time. Instead, you can install git alone, but you need to complete additional configuration.

Method One: quick but more involved

  1. Download git for Mac from the binary installer option here: https://git-scm.com/download/mac. Note: the installer links to a Sourceforge downloader, but the latest version may not download by default. Scroll down to get the latest version of git (as of October 2021, that is version 2.33)

  2. Install git from the .dmg file.

  3. After installing, you also have to add its directory to your path. From terminal, type: echo "PATH=/usr/local/git/bin:\$PATH" >> ~/.bash_profile then source ~/.bash_profile

  4. Re-open terminal and Test install

Method Two: longer to complete, but easier

  1. Open a terminal.

  2. Type the following in the terminal:
    xcode-select --install
    
  3. Test install

Windows

As part of installing git, install the gitbash command line environment so that the command line is consistent across Windows, OSX and Linux.

  1. Download git for windows: https://git-scm.com/download/win

  2. Click on the git installer:

git installation icon, looks like a tree branch inside 4 colored squares

  1. Accept the license and click Next:

license acceptance window

  1. Select the installation folder, default is fine. Click Next:

installation folder browser with text window showing folder path

  1. Select the components to be installed, the default is fine:

list of check boxes showing install options: additional icons, on the desktop, Windows Explorer integration, Git Bash, Git GUI, Git LFS, Associate *.git configuration files with the default text editor, associate .sh files to be run with bash,  use a true type font in all console windows, check daily for git for windows, check daily for git console updates

textbox with browse button listing start menu folder options

  1. Choose the default editor used by Git. Select Visual Studio Code as the default editor. (Note that you must install Visual Studio Code first before you can move forward past this step of the Git install.) Click Next:

installation menu containing drop down of editor options: nano, vim, notepad++, visual studio code, visual studio code insiders

  1. You may be prompted to change “the name of the initial branch.” The emerging standard seems to be “main,” so if you see the following dialogue box, select “Override the default branch name for new repositories,” type “main” in the text box, and then click Next:

two radio buttons: let git decide and 'override the default branch name for new repositories'

  1. Choose the “Git from the command line and also from 3rd-party software” radio button and then click Next:

three radio buttons: use git from git bash, use git from command line, use git and optional unix tools from the command prompt

  1. Choose “Use bundled OpenSSH”. Click Next:

list of radio button options: 1) use bundled OpenSSL, 2) use external SSH

  1. Choose “Use the OpenSSL library”. Click Next:

list of radio button options: 1) use the OpenSSL library, 2) use the native windows secure channel library

  1. Configure the line ending conversions (the default is fine). Click Next:

list of radio button options: 1) checkout Windows-style, commit unix-style , 2) checkout is as is, commit is unix style, 3)checkout as is, commit is as is

  1. On the ‘configuring the terminal emulator to use with Git Bash’ window, choose the “Use Windows default console window” option:

two radio buttons: 1) Use MinTTY, 2) use Windows default console window Note: Do not choose “Use MinTTY (the default terminal of MSYS2)” as that will break Python.

  1. Configure the default behavior of ‘git pull’ (the default is fine).

three radio buttons: 1) default fast-forward or merge, 2) rebase, 3) only ever fast-forward

  1. Configure credential helper. The default option “Git Credential Manager” is what you want. Click Next:

two radio buttons: 1) git credential manager, 2) none

  1. Configure extra options (the defaults are fine). Click Next:

check boxes: 1) enable file system caching, 2) enable symbolic links

  1. Configure experimental options (the defaults are fine). Click Install:

check boxes: 1) enable experimental support for pseudo consoles, 2) enable experimental built-in file system monitor

  1. Git should now be installing:

image of progress bar

  1. Click through the rest of the install, leaving the defaults, and then click Finish on the last window:

final installation window that says "completing the git setup wizard"

  1. Test install

Test Install

Test that git is installed:

  1. Open a windows or OS/X terminal.

  2. Type the following into the terminal:

     git
    

The terminal should print something like (note that this is truncated):

usage: git [--version] [--help] [-C <path>] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]


Updating an earlier development version of Git (that is already installed)

Check which development version of Git is currently installed on the computer:

  1. Open a windows or OS/X terminal.

  2. Type the following into the terminal:

    git --version
    

Check for the most recent development version of Git on their website here. As of October 2021, the most recent development version of Git is 2.33.1.

To update a computer that already has an earlier development version:

Open the Git website downloads page in a browser and follow the posted download instructions according to the computer type: Mac, Linux/Unix, or Windows.

Then, check that the new development version of Git is now installed:

  1. Close, and re-open a windows or OS/X terminal.

  2. Type the following into the terminal:

    git --version