Git Installation - Windows4:09 with Tommy Morgan
In this video, we'll walk you through getting Git installed on a Windows machine.
Before you install on Windows
- You might wish to install the Notepad++ text editor OR install the Visual Studio Code IDE prior to installing Git for Windows. If you do so, then when you're installing Git, you will be given additional options for the default text editor Git should use for commit messages.
Additional Windows installation notes
- Visit the Official Git Website to download Git for Windows.
- As of Git version 2.16.2, the Windows installer has changed slightly from what is shown in the video.
- You should still keep the default settings on most screens.
- A new "Select Start Menu Folder" screen has been added. Keep the default: "Git".
- A new "Choosing the Default Editor Used by Git" screen has been added.
- Do not keep the default for this one, unless you are comfortable with the "vim" text editor.
- Instead, switch to "Nano".
- Or, you can switch to "Notepad++" or "Visual Studio Code" if you have one of those installed.
- On the "Adjusting your PATH environment" screen, the "Use Git from Git Bash only" option is no longer the default. You should switch to "Use Git from Git Bash only".
- A new "Choosing HTTPS Transport Backend" screen has been added. Keep the default here: "Use the OpenSSL Library".
- A new "Configuring the terminal emulator to use with Git Bash" screen has been added. Keep the default here too: "Use MinTTY".
- A new "Configuring extra options" screen has been added. Keep all the default values here.
Using Git on Windows
- You might find, depending on how you create your files as you follow along with Treehouse lessons, that some of your filenames end in ".txt", even if the files shown in the video don't. (This will not be an issue for the Introduction to Git course, but it might for the older Git Basics course.) You can either adjust to this as you follow along, or just rename the files - the
mv file1.txt file1) can get rid of that .txt extension for you so you can follow along more easily.
Like I mentioned in the previous stage, Git was created by Linus Torvalds, 0:00 the inventor of the Linux operating system. 0:04 Because of Linus' familiarity with the POSIX file system that Linux uses, 0:07 Git has a lot of dependencies that aren't easily available to Windows. 0:11 For a while it was very difficult to get Git up and running on a Windows machine. 0:15 But I think it's safe to say that Git wouldn't have attained its current popularity 0:19 if people hadn't been able to solve that problem. 0:23 Fortunately for us, there's a simple installer available from the Git website. 0:25 Let's walk through that installation and get you ready to follow along. 0:30 At the time this video was recorded, this is what the official Git website looked like. 0:34 It's located at git-scm.com. 0:38 If anything looks different from my instructions here, be sure to check out the teacher's notes for this video for updated instructions. 0:43 First, you can see that the website recognizes that we're on a Windows PC 0:50 and directs us to the latest download for our system. 0:54 Don't worry if you're getting a different version number here. 0:58 All of the commands we're using in this lesson will work just the same. 1:00 Let's click that button. 1:04 This will download an installer package for us. 1:07 Let's run that when it's finished downloading. 1:10 We'll have to accept the license, choose an install destination— 1:24 I'd recommend just leaving the default, but if you have any strong preferences, feel free to change it. 1:28 This screen can be a little confusing. 1:33 Let's leave it as is here. 1:35 I'm also going to uncheck the Windows Explorer integration option 1:37 just because we're not going to be using it, 1:41 but feel free to leave that enabled or mess with any other options if you're comfortable. 1:43 This option will determine where the Git commands are accessible from. 1:52 I'd recommend using Git Bash only, unless you're aware of what the other options mean and have a preference. 1:55 Without getting into too much detail, Windows and UNIX systems like Linux and Mac OS X 2:01 have differing opinions about the way that files are formatted, 2:08 and if you don't account for that, you can cause some major annoyances for your teammate. 2:11 The first option here is the safest, so we'll go with that. 2:16 Now the installer is going to do its thing. 2:19 And here we go. All finished. 2:25 We don't particularly need to see the release notes. 2:28 This is what the Start menu looks like on Windows 8. 2:33 If you have an older version of Windows, just open your Start menu and look for the Git folder. 2:35 You'll note that we have 2 options here— 2:40 Git GUI and Git Bash. 2:43 Some people prefer to work in the GUI, which is fine, 2:47 but we're going to focus on the command line for now, 2:51 so we won't be using this tool. 2:53 Definitely explore it later if it interests you, though. 2:55 Git Bash, on the other hand, is a command line environment that emulates a UNIX system. 3:01 This will enable you to use the Git command line interface. 3:07 Try it out now by running git --version. 3:11 This will also be compatible with almost every command that we run in our videos, 3:15 including common UNIX commands like ls. 3:19 There is, however, one important difference if you're planning to follow along in the videos. 3:24 There will be some occasions where I edit files using the Nano text editor, 3:29 and Nano will not be available on your system. 3:33 Instead, I'd recommend using the ubiquitous Windows text editor Notepad. 3:37 So every time I type nano followed by a filename, 3:42 just type notepad followed by the filename, like so. 3:48 And everything should be great. 3:54 Hopefully your install went smoothly and everything is working. 4:00 If not, be sure to post about your problem in the forums, and somebody should be able to help you get it taken care of. 4:03
You need to sign up for Treehouse in order to download course files.Sign up