Installation7:41 with Nick Pettit
In this video, you'll learn how to install the git versioning system on both Mac OS X and Windows.
[?mellow guitar music?] 0:00 [Think Vitamin Membership - Est. 2010] [membership.thinkvitamin.com] 0:03 [Version Control: Git - Installation with Nick Pettit] 0:07 The mechanics of Git can seem a bit cryptic at first, 0:13 but fortunately, installation is a breeze. 0:17 In this video, you'll learn how to install Git on Windows and Mac OS X. 0:19 There are a couple of different ways of installing Git. 0:24 If you enjoy compiling software on your system, 0:28 you can go ahead and install Git from source. 0:31 For detailed instructions, visit https://gist.github.com/423308. 0:34 If you've done this sort of thing before, you shouldn't find it too difficult; 0:45 however, that's a little bit beyond the scope of this video. 0:49 Instead, we're going to use the nice package installers 0:53 that the Git project provides us. 0:58 Regardless of your platform, 1:01 the first thing that you're going to want to do is direct your browser to git-scm.com. 1:03 We're going to walk through installation for Mac OS X first, 1:11 and then we'll walk through the installation for Windows. 1:15 So over here on the right side, we just need to click on the OS X icon there. 1:19 Now, in order to use the package installer, 1:25 you need to be running OS X Leopard or later. 1:28 They do have a universal binary down here at the bottom, 1:32 if you're not running an Intel chip yet. 1:36 Chances are you are, though, so the version you'll want to install 1:39 is the most recent version up at the top here. 1:43 So if you just click it, you can click here, and the file will start downloading. 1:47 And once the file has downloaded, 1:55 you just need to go ahead and go to your Downloads folder 1:58 and off-screen here, I'm just going to go ahead and mount the disk image. 2:03 And we just need to go ahead and double-click this package installer here 2:11 and then it'll give us a nice Software Installation Wizard, 2:18 and we can go ahead and just click through the steps here. 2:21 And it'll ask you to enter your password, and then it will go ahead and install Git, 2:26 and it should finish pretty quickly. 2:34 And that's it. 2:37 Now, in order to make sure that we installed Git correctly, 2:39 you're going to want to go ahead and open up the Terminal. 2:43 If you never used Terminal before, 2:47 you can find it in the Utilities folder inside your Applications directory. 2:50 Once you're done installing Git, you'll want to check to make sure 2:54 that it's installed properly, and to do that, 2:59 we're just going to type git - -version 3:01 and if the package installed correctly, you should see the version number 3:07 for the version of Git that you downloaded. 3:11 At the time of this recording, the latest version is 126.96.36.199. 3:14 It's that easy. 3:20 Now, if you are having trouble installing Git, 3:21 please check the Read Me file that came inside of the disk image 3:24 for common problems and solutions. 3:27 For example, if you have the iPhone Developer Tools open 3:29 while the installer is running, you could run into some issues. 3:33 Now, if you're using Windows, your experience of installing Git 3:37 should be somewhat similar, but there are a few more configuration options 3:43 when installing. 3:48 So first, you'll want to visit git-scm.com, just like we did before, 3:50 and then over here, on the right-hand side, 3:55 just pick the package installer option for Windows 3:58 and this will take you to a screen with a few options to choose from. 4:02 Unless you have some very specific needs, I recommend using the full installer, 4:07 up at the top. 4:12 It will install Git and give you everything that you need, 4:14 so let's go ahead and download that. 4:17 And we'll just download this executable here, 4:20 and save it to our computer, and then we can go ahead and Run it. 4:23 This will bring up the Installation Wizard 4:28 similar to the one on Mac OS X. 4:32 And when we go through this Wizard, you'll actually have a few more options. 4:37 So we'll go ahead and accept the Licensing Agreement, 4:41 say we want to install it in Program Files, 4:44 and if you want, you can install the Context Menu Entries for Windows Explorer 4:48 so that when you're in the Git directory, 4:55 you can bring up the special Git terminal 4:58 just by right-clicking and bringing up a Context Menu. 5:01 If you've ever used TortoiseSVN or something similar, 5:05 this works just like that. 5:08 Some people find this easier to use, 5:10 but I'm going to go ahead and just stick with the defaults in this particular case. 5:12 So I'm going to hit Next, and we'll add it to our Start menu, 5:16 and now you come to another choice. 5:21 Because we're on Windows, we don't really have a proper command prompt 5:24 like other UNIX-based operating systems, 5:28 so we'll need to use something called Git bash. 5:31 You can run Git from the Windows command prompt using Cygwin 5:35 and this will add Git to your path. 5:39 Finally, you can run Git and other UNIX tools from the vanilla command prompt. 5:41 However, I don't recommend using these last 2 options here 5:47 unless you really know what you're doing. 5:51 Having installed Git onto several Windows computers in the past, 5:54 the default option at the top is the most stable choice, 5:57 so we'll go ahead and stick with that. 6:01 Next, there's the question of whether you should have Windows line endings 6:03 or UNIX line endings. 6:08 Again, you should be fine sticking with the defaults here; however, 6:10 if you're the one Windows person on your team 6:13 and you're collaborating with other developers that are using OS X 6:16 or some other flavor of UNIX, 6:20 you may want to quickly consult with them before making this decision. 6:23 Again, in most cases, the defaults are fine, 6:26 so don't stress over it. 6:29 So we'll go ahead and click Next, 6:31 and with that, we're now installing Git. 6:34 And this should finish pretty quickly here. 6:36 Now, if you stuck with the defaults, there should be a Git folder 6:42 that's been added to your Start menu, 6:48 so we'll go ahead and go to All Programs here, 6:50 and we'll go to Git, 6:55 and we're going to go ahead and open up Git bash right here. 6:57 This is a bash command prompt running inside of Windows 7:03 and it's how you'll interact with Git. 7:07 If we go ahead and type Git - -version and hit Enter, 7:10 you should see the version number for the version of Git that you installed, 7:15 and again, at the time of this recording, the latest version is 188.8.131.52. 7:21 Installing Git used to be a bit tricky, 7:28 but with the packaged versions we have now, 7:31 installing Git is actually pretty easy. 7:34 [?mellow guitar music?] 7:36 [Think Vitamin Membership - Est. 2010] [membership.thinkvitamin.com] 7:39
You need to sign up for Treehouse in order to download course files.Sign up