Logging Experiences

How to setup Git for Windows

Posted in Git, Programming by Sina Iravanian on May 1, 2012

These are some easy steps required to setup Git for Windows:

  1. Download msysGit from: http://code.google.com/p/msysgit.
    I prefer to use the portable version. At the time of this writing there’s no difference between 32 bit and 64 bit versions and the filename for the portable version is: PortableGit-1.7.10-preview20120409.7z. Currently it seems that the development of the project has been moved to Github, but the releases are still located in Google Code.

  2. Extract the contents in a proper location. I made them into:

  3. If you intend to use the git command-line for every git operation simply run git-bash.bat in the root folder of msysGit. Yes, this is the old lovely Cygwin command-line.

  4. If you don’t intend to use command-line (like me) install TortoiseGit. It is hosted at Google Code:
    Note that it comes with different releases for 32-bit and 64-bit systems. At the time of this writing the latest version is After installing TortoiseGit you may need to restart Windows, or the explorer process, or none.

  5. Right click somewhere on a Windows Explorer window, and from the context menu select: TortoiseGit > Settings. There will be a message-box appearing begging for adjusting the path to msysGit. Click on “Set MSysGit path” button (If you have ever missed this window, or want to change the path to an already existing msysGit, simply go to: TortoiseGit > Settings >> the General branch).
    In the field titled as “Git.exe path:” enter the path to the bin folder of the msysGit installation/copy.

  6. You don’t have to, but it is highly recommended that before starting any git operations you set some global settings such as your name, email, and AutoCrlf. To this aim in the Windows explorer’s context menu go to: TortoiseGit > Settings >> the Git branch. Fill in the fields labeled Name and Email with proper values. Then make sure that AutoCrlf check-box is unchecked, so that you don’t touch every file in order to change their line-endings. Read more about this kind of problem here, and see here to know more what AutoCrlf and SafeCrlf options do for you.

  7. [UPDATED on 3 May 2012] When performing some git operations, git may complain that it cannot connect through a null proxy. It may happen for some versions if in git settings the value for proxy is assigned to an empty string. If this is the case for you, simply remove proxy settings in the global .gitconfig file. To do this, right click somewhere in Windows explorer, go to: TortoiseGit > Settings >> The Git Branch >> Edit Global .gitconfig button. From there remove the line that assigns proxy, or the whole “[http]” section if it only contains proxy settings.

See also:
Using Git with CodePlex on Windows
Using Git with Github on Windows

Tagged with: , ,

2 Responses

Subscribe to comments with RSS.

  1. […] My Persian Blog « How to setup Git for Windows […]

  2. […] Comments Using Git with CodeP… on How to setup Git for Wind…f1 forum on Sample Variance vs. Population…anon on Enabling Middle Click in […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: