Setup Git on Windows

Git is a version control system really useful for tracking changes in computer files and coordinating work on those files among multiple people.

Installation on Windows

To install Git on Windows you have to download Git for Windows.

Once the installation is complete, you will need SSH as well. Take a look at Setup SSH on Windows.

Git Setup

To setup Git you will use the command git config. More informations can be found in https://git-scm.com/.

Configure your Identity

Your identity (username and email) must be configured:

git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

The --global option will configure your Git durably. If for one project you want to configure another username or email, you have to run the same command without --global.

Configure your Editor

For example, if you want to change your default text editor to Nodepad++, the command is:

On a x86 system

git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -nosession"

On a x64 system

git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession"

Check the Settings

To check your settings, the command is git config --list.

git config --list

It will return something like:

user.name=John Doe
user.email=johndoe@example.com
color.status=auto
color.branch=auto
color.interactive=auto
color.diff=auto

Suggest edits

Setup Git on Windows

©2024 Scalingo