Do you already have the git commandline utility?

You may already have git installed. You can verify this in two ways:

  • Open Command Prompt and type git --version and hit enter. If you see git version 2.30.0.windows.2 (or any other version number), you are good to go. Otherwise, you’ll need to install git.


Installation

Go to the installation link, and the installer should begin downloading automatically. When finished, run it, choosing the following options:

  • Information: Click next to skip past the GNU General Public License.
  • Select Components: Generally it’s safe to leave the defaults as is. Notably, you may want a Desktop icon or not.
  • Choosing the default editor used by Git: if you have a text editor you prefer, select it from the dropdown, or select the ‘other editor’ option and provide the location in your filesystem. If you don’t have a preference, select Notepad. This option is not used all that often, so don’t stress too much about it.
  • Adjusting the name of the initial branch in new repositories: This relates to the name of the default branch when creating a new git repo. At the time of writing, ‘letting git decide’ will mean you use the term master. However, within the software community, there has been an trend to use more inclusive language. Selecting the ‘override’ option will let you choose a name. main is the most popular alternative - as well as needing fewer characters to type than master!
  • Adjusting your PATH environment: Leave this at the recommended option.
  • Choosing the SSH executable: Leave defaults.
  • Choosing HTTPS transport backend: Leave defaults.
  • Configuring the line ending conversions: The default, Checkout Window-style, commit Unix-style line endings is best.
  • Configuring the terminal emulator to use with Git Bash: Leave defaults.
  • Choose the default behavior of git pull: Leave defaults.
  • Choose a credential helper: Leave defaults.
  • Configuring extra options: Leave defaults.
  • Configuring experimental options: Leave all off. Click Install to finish installing git.


Verifying installation

Once this is finished, you should be able to open a terminal (search for ‘PowerShell’, ‘Command Prompt’, or ‘Git Bash’ in the Windows Start menu), and type git --version: you should see something similar to git version 2.30.0.windows.2. Note that your version number may differ from the one shown here.


Setting up git

To set up git, go to the Git Setup webpage.