Setup Git in PowerShell

Update: This tutorial has been updated to also work with Windows 10 and Git 2.5

If not all, then most credit for making this guide goes to Simon Skov Boisen and Haacked.

This guide will setup you up to use Git and GitHub through PowerShell, the enhanced commando promt for Windows.
taught. It provides a lot of commands that nearly covers everything you need to work with GitHub.

  1. Download the latest version of git here: Latest version of Git.
    1. When installing, at “Selected Component” the following should be checked:
      1. Associate .git* configuration with the default text editor
      2. Associate .sh files to be run with Bash
      3. Use a TrueType font in all console windows (not only for Git Bash)
    2. Hit ‘next’ and choose “Use Git Bash Only” and hit Next.
    3. Choose “Checkout-as-is, commit as-is” and hit Next.
    4. Choose “Use Windows’ default console window” and hit Next.

     

  2. Open PowerShell in admin-mode (Right click and “Open as Administrator”)
    1. Copy-paste in the following (paste by right-clicking). This will make sure we can install files on your system.
      		Set-ExecutionPolicy RemoteSigned 
    2. To start the installation, paste in the following:
      		cd $env:userprofile
      		(new-object Net.WebClient).DownloadString("http://bakgaard.net/Git/GitInstaller.ps1") | iex 
    3. Follow the onscreen instructions.

Git is now up and rocking for your computer!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>