Getting started with Git shell on Windows

This is a step by step guide to help you getting started with git on Windows.


Git logo

Install the git shell

There is a fresh Github gui for Windows as well as many other graphic interfaces, but, git was designed to be used from a shell: remember that it was the version control system that Linus Torvalds wrote to develop Linux.

It is much more expressive using it from command line, and to mock up a gui with all those features and options would be completely insane.

So, use the ghost in the shell.

Go to Git for Windows platform download page and get the last installer: at the time of this writing is


just hit the Next button and trust defaults.


All the following commands should be launched from a git shell.


First of all, know your current configuration.

git config --list

Add your user name and email, for instance

git config --global ""
git config --global "fibo"
The email used in the commands is the default email you get from GitHub. Of course you need to set your actual email as well as your name, do not use fibo

SSH public key based authentication

This step is not required, but, it is really usefull. You can generate an ssh key to bypass authenitcation prompt, i.e. insert your username and password everytime you push to remote server.

Create an ssh key

You need an ssh key if you want to authenticate easily on a web-based hosting service, like GitHub.

ssh-keygen -t rsa -C ""

By now I just hit enter three times, even when prompted for a passphrase.

For more information about passphrase see: Working with SSH key passphrases.

Add your ssh key on your hosting service

You need to copy the content of you The easiset way to copy it, if you have the clip.exe command is

clip < $HOME/.ssh/

which will copy your public key to the clipboard so you can edit your hosting service’s account preferences and paste it after you add a new ssh key.

For example, on GitHub is under the SSH keys profile settings menu.

Check it

You can check your ssh key is working, using ssh -T, for instance

$ ssh -T
The authenticity of host ' (' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ',' (RSA) to the list of know
n hosts.
Hi fibo! You've successfully authenticated, but GitHub does not provide shell ac

or even

$ ssh -T
conq: logged in as fibo.  You can use git or hg to connect to Bitbucket. Shell access is disabled.
If the check above does not work, probably your firewall does not allow connections on port 22.

Read Bypass restrictive firewall settings instructions to work around it.