How to setup Git for Windows
These are some easy steps required to setup Git for Windows:
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.
Extract the contents in a proper location. I made them into:
If you intend to use the git command-line for every git operation simply run
git-bash.batin the root folder of msysGit. Yes, this is the old lovely Cygwin command-line.
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 188.8.131.52. After installing TortoiseGit you may need to restart Windows, or the explorer process, or none.
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.
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.
[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
.gitconfigfile. 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.