Git is an open source, free, distributed, version control system created by Linus Torvalds the creator of Linux. A version control system tracks changes in the files and folders of your project over time, and allows you to recover back versions. It can be used on a large variety of projects by software developers and writers, for example. It was built to be a distributed, and allow developers working around the globe to collaborate, and at the same time work independently of one another.
Git created on Linux in 2005, has since been ported to both Mac and Windows. This article will focus on installing Git on Windows. There's a lot of good documentation on Git out there on the Internet, and several Git books have been published that will walk you through how to use the program after its installed.
To get Git, go to the download site here. Select the "Git-126.96.36.199-preview20100309.exe" full installer for Windows, download it, save it, and click on it to install. The installer will install a Linux command window, like the Windows command window on your computer. You will initially use the program in the Linux command window. Have no fear, there are a couple of GUI's that will make life easier, if your not a Linux user.
Let's walk through the installer screens which can be confusing your first time through. Click the exe file, click run, and you get:
Click Next and you go to the GNU license:
The next screen asks you where you'd like to install the program. The default is fine.
The Next Screen is the first one that asks you to make some choices.
Additional icons will put an icon you can click on your desktop to open the Git command window. In the Windows Explorer Integration, click both Git Bash and Git GUI. Git Bash is the Linux Command Window that, at least initially, you will use to run Git. Git GUI is a graphical user interface, you can use instead of the command line. This is a full page Gui that you can use to visually run GIT. The choice of BASH and GUI eliminates git cheetah, a windows client interface you could use with Git. I recommend BASH and GUI. Next...
If you want to put the Git start-up menus for Git Bash and the Git GUI in a particular folder in your Start Menu in Windows, this is where you can tell the Installer where to put the links. The default is fine, you can always change it later. A caution here, if your running Windows 7, 64bit, you should check "Don't create a Start Menu Folder, then after the program is finished loading, right click on any Start menu folder, and select "Git Bash Here." There is a bug with Windows 7, 64 bit, and this is a work around. Next the path environment screen ...
The three choices ask how you want to run the program. Choice 1 means you'll open up a Bash Linux command window and work with Git this way. Choice 2 should only be used if you are running Cygwin's Git, which we are not, which leaves Choice 3 with the red warning. Ignore this warning, you want to run the Git tools, like the GUI for example. Choice 3 it is. Next...
This screen can be confusing. In Windows, we run Git in a Linux command window environment as if it were Linux. Files have different line endings in Linux than in Windows files. Your development on Windows is done with Windows files. This screen is asking if you want your files and folders stored in the repository with Windows line endings or Linux line endings. You would think that choice 3 is a no brainer, don't convert anything. Hold on though. If you ever want to share your work with others or put your work in another repository on a Linux machine, you'll need to do the conversions. Git will take care of these conversions automatically, so why not use Choice 1. When you get files from the repository it will convert to Windows line feeds, when you put them into the repository it will convert to Linux line feeds. Git is lightning fast, so there's minimal hit on performance. Choice 2 can get you in trouble, and is more for a Linux environment. I recommend Choice 1. Next... and your off.
Congratulations, you've installed Git. If you would like to check that Git is installed properly, you'll find a Git Bash icon on your desktop, click on it, and the Git command window will open, at the prompt type, "git --version" and Git will print out the version number.