Skip to content

Latest commit

 

History

History
130 lines (74 loc) · 4.23 KB

File metadata and controls

130 lines (74 loc) · 4.23 KB

Install Git for Windows

Setup Guide and verification checklist

Setup

Tested on: Git for Windows 2.27.0.windows.1

Note: If you are installing a newer version that has additional steps, leave those new steps at their default values.

Step 0: Download

Download the installation package from the Git official website.

Step 1: License

If you are updating, uncheck the "Only show new options" checkbox in order to see all the installation steps.

License

Step 2: Components

Leave the default components as shown below.

Components

Step 3: Default Editor

If you leave the default option, Git will use the Bash default editor (based on the EDITOR environment variable), which is Vim. Vim can be hard to use and unintuitive compared to modern editors.

The Git core.editor option will remain unset, but this can be modified later on in your personal configuration.

Default Editor

Recommended: Select here one of your favorite editors which you already have installed on your system.

Default Editor

Step 4: PATH environment

Recommended: Select the option "Git from the command line and also from 3rd-party software".

PATH environment

Step 5: HTTPS connections

Leave the default option "Use the OpenSSL library".

HTTPS

Step 6: Line endings

Recommended: Select the option "Checkout as-is, commit Unix-style line endings". With this option we ensure that we always have LF line endings inside the repository.

Don't overcomplicate things by forcing Git to convert line endings. All modern Windows code editors work with Unix-style LF line endings. Also, there are development tools that rely on LF line endings to work properly (npm scripts, linters, etc...).

TIP: If you use file types that explicitly require CRLF line endings, specify them in a .gitattributes file.

Reference reading:

Line endings

Step 7: Terminal emulator

Leave the default option as shown below.

Terminal emulator

Step 8: Default behavior of git pull

Leave the default option as shown below.

Default git pull

Step 9: Extra features

Leave the default options as shown below.

Extra features

Step 10: Experimental features

Don't select any experimental feature, as shown below.

Experimental features

Step 11: Finish the setup

Congratulations! You've completed the installation. Now let's verify that everything works correctly.

Finish

Verify the installation

In the Windows context menu you should see two new options, one of which is "Git Bash Here".

Context Menu Git Bash

Check that the git command was added to the PATH environment variable. This way external tools can use our installed Git version.

Run git --version in CMD and PowerShell.

CMD PowerShell