Setting Up Git on Windows in Four Easy Steps

Introduction

Setting up Git can be intimidating, especially for those that are trying a version control system for the first time or moving from Subversion. It use to be the case that Git was a huge hassle to install and use on Windows. However, today it’s very easy to use Git on Windows either through Git Bash, if you are a fan of the command line, or if you prefer, a graphical interface, through programs such as TortoiseGit. But don’t fret – we’ll show you how to set everything up and connect it with Assembla.

Table of Contents

  1. Download and Install Git for Windows
  2. Download and Install TortoiseGit (Optional but recommended for first timers)
  3. Generate SSH keys
  4. Link SSH key with Assembla

Prerequisites

  1. Assembla Git repository – sign up if you haven’t already, Git and all our other project management tools are totally free for teams up to 3 people.
  2. A strong desire to install Git on Windows.
  3. That’s it, let’s go!

1. Download and Install Git for Windows

Getting started. You’ll need to download and install Git for Windows. If you’re unsure of which one to choose, just go with the full installer. After downloading, run the installer.

welcome_Git-setup

If you have PuTTY/TortoiseSVN installed, you may see this screen, otherwise just ignore this. Regardless, use OpenSSH to make things easy.
SSH Executable

From here, the process become quite streamlined. Simply follow the setup steps to ensure optimal settings. We recommend selecting “Use Git Bash only” as it provides an unmodified PATH.

Git_adjustPath

After selecting next, we recommend chosing the option of “Checkout Windows-style, commit Unix-style line endings”. Select next once you have done this.

Git_Configure_LineEndings

Git_Installation_InProgress

Git_Installation_complete

 

Download and Install TortoiseGit

TortoiseGit is a Windows Shell Interface to Git and based on TortoiseSVN.
This step is optional. If you are comfortable using the command line for interacting with Git, you don’t need to install TortoiseGit.

Next up, let’s download and install TortoiseGit.

Before you start the installation, please make sure that you choose the right installer for your PC, otherwise the setup will fail.

 

Tortoise_Git_3

 

Tortoise_Git_4

 

Tortoise_Git_5

 

Tortoise_Git_7
We’ll need to configure TortoiseGit – to do this, right click anywhere on your Desktop, select “TortoiseGit” and then “Settings.”

tortoise8
Find “Git” and then click on “Config” from the menu on the left. Then fill in your Name and Email, making sure to use the same email that you used to sign up for Assembla.

Don’t forget to click OK when you’re done.

tortoise9

Great, now TortoiseGit is all set!

Generate Your SSH keys

There’s two ways to generate SSH keys:
1. If you installed TortoiseGit, use the method directly below. 2. If you only installed Git on Windows and are not using TortiseGit, jump to the “Git Bash SSH Keys” section.

TortoiseGit SSH Keys

SSH creates a secure connection from your computer to Assembla, making sure that you are who you claim to be so that only authorized persons can commit to your repository. Assembla needs to know your public SSH key to make the secure connection, so let’s fire up Puttygen to generate an SSH key pair.

Start -> Programs -> TortoiseGit -> Puttygen

puttygen1
In Puttygen, first click on the “Generate” button.

puttygen2
Next up – you’ll move your mouse around the big gray area under the progress bar to generate randomness for super security.

puttygen3
Once the key is generated, you should copy it onto your clipboard. You will use this later to authenticate with Assembla.

puttygen4
Afterwards, choose a memorable password and confirm it. Don’t forget your password!

puttygen5
Finally, click on the “Save private key” button and save your private key somewhere you’ll remember.

puttygen6

Git Bash SSH Keys

If you did not install TortoiseGit, you’re at the right place! If you did install TortoiseGit, follow the steps above and skip this section.

 

  • Start up Git Bash: Start -> All Programs -> Git -> Git Bash
  • On the command prompt, type in the following command substituting with the email you used to sign up for Assembla.
  • When it asks you for the file, just hit Enter.
  • Please note that you should definitely enter a passphrase; when you type, nothing will show up. This is normal, don’t worry about it.

ssh-keygen -t rsa -C “[email protected]

Use Notepad to open up the .ssh/id_rsa.pub file you just generated and copy the all of the contents of that file.

Link Your SSH key with Assembla

Open up your Assembla profile which is where you’ll paste the public key you just copied from the previous step.

key1
Click “Add Key” after you’ve pasted the key into the box. You should see something like the following picture below. If so, congratulations, you’re done with this section!
key2

– See more at: http://blog.assembla.com/AssemblaBlog/tabid/12618/bid/77264/Setting-Up-Git-on-Windows-in-Four-Easy-Steps.aspx#sthash.uMKHhVUp.dpuf

Revisions

One Response to “Setting Up Git on Windows in Four Easy Steps”

  1. Edythe Seymer 28/04/2018 at 11:01 pm #

    *Aw, this was a really nice post. In idea I would like to put in writing like this additionally ? taking time and actual effort to make a very good article? but what can I say? I procrastinate alot and by no means seem to get something done.

Leave a Reply