Introduction4:31 with Jay McGavren
Learn what Git is and how it can save you from losing your work!
According to the Stack Overflow 2017 Developer survey, Git is now the world's most popular version control system, with close to 70% of developers using it.
Installing and using Git on your computer
- Windows: Git is not pre-installed on Windows machines. Check out our video on Git installation for Windows. Be sure to check the Teacher's Notes on the video page for additional notes, as the installation process has changed slightly since the video was recorded.
- Mac: Every Mac comes with Git pre-installed! To access it, all you need to do is open a terminal with a Bash prompt. You can find instructions for opening the Terminal program in this Treehouse Blog post.
- Linux: Linux systems also come with Git pre-installed. If you're running Linux, we assume you already know how to get to a terminal, but if you're stuck, click the Get Help button on this page to ask for help in the Treehouse Community forum.
[MUSIC] 0:00 Hi, I'm Jay McGavren, a web developer and teacher at Treehouse, 0:06 and I'm here to introduce you to the Git version control system. 0:11 Now we know, you're probably itching to get back to coding. 0:17 You're probably wondering what a version control system is nd 0:20 why you'd even need one. 0:23 Or if you know what version control systems are, you may be wondering, 0:25 why should I choose Git? 0:29 If you haven't been a developer very long, 0:31 then you may not have lost any of your work. 0:33 You haven't accidentally deleted files you need or 0:35 introduced a bug you can't find the cause of, yet. 0:38 Let me assure you, it's a matter of time before you do. 0:41 Version control systems keep old versions of your files for you. 0:45 Like a time traveler, you can jump back to earlier versions. 0:48 This is really helpful when you make mistakes or delete files, and 0:52 want to recover your work. 0:55 Think of it like an undo command for an entire project's worth of files. 0:57 Version control is so important that many different 1:02 version control systems have been created over the years. 1:05 Examples include subversion and more recently, Mercurial and Git. 1:08 According to the Stack Overflow 2017 developer survey, 1:13 Git is now the world's most popular version control system. 1:16 With close to 70% of developers using it, when you join a development team, 1:20 there's a very good chance they're going to want you to use Git. 1:25 Now, we don't wanna mislead you, learning Git will take some work. 1:29 For those of you that haven't used the terminal before, 1:33 we'll need to give you a brief primer in how to run commands. 1:35 And even if you know your way around the Terminal, but 1:39 less frequently use Git commands can be challenging to understand. 1:41 But once you know what's going on and have had some practice, Git is easy to use. 1:45 The most commonly used commands aren't very complicated. 1:50 More importantly, Git is a powerful way to share work across a team. 1:53 And because it's distributed, you won't lose all your project's history if 1:58 something happens to the central server, as we'll see in the next video. 2:01 I've used Git every working day for almost ten years now, and 2:05 personally I would never switch back to another version control system. 2:09 Git is just that much better. 2:13 So Git may take some work to learn, but 2:16 let me assure you, the payoff is totally worth it. 2:17 And don't worry, we're going to walk you through every step of the way. 2:21 We're not going to cover every aspect of Git, but 2:24 we are going to cover the most commonly used aspects in careful detail. 2:27 We'll show you what the commands mean, how to work with command line options, and 2:31 everything else you need to know. 2:35 Have your ever heard the phrase, use it or lose it in reference to your memory? 2:38 We're bombarded by irrelevant information like advertisements and gossip everyday. 2:42 And your brain has evolved to forget most of it. 2:47 And your brain could decide to forget the information in this course 2:51 unless you convince it this stuff matters. 2:54 You tell your brain not to forget a piece of information by using that information. 2:57 When you make your brain work to recall something, 3:02 your brain decides it's important and keeps it around longer. 3:05 That's why we're providing you with quizzes, code challenges, and 3:08 other opportunities for practice as part of this course. 3:12 Make sure you practice what you've learned, 3:15 you'll remember it much better if you do. 3:18 Our focus will be to get you up and running with Git. 3:21 And then get your code shared on GitHub or 3:24 another code hosting site of your choosing. 3:26 There's more to get than that, but we'll be showing you the commands that 3:29 even professional developers spend 80% of their time using. 3:32 We'll have links in the teachers notes to resources where you can learn the other 3:36 stuff if you want. 3:39 Don't hesitate to use the video play back controls during the course. 3:40 For the parts you already know, you can put the video on double speed. 3:44 For the parts you need to review more closely you can put the video on half 3:48 speed, rewind it, or pause it as needed. 3:51 It's important to follow along as we go through the course, but 3:55 you don't have to have Git installed on your computer. 3:57 We have Git pre-installed for you on workspaces, 4:00 Treehouse's online development environment. 4:03 In addition to a code editor, 4:05 workspace includes a console that works just like a Terminal on your computer. 4:07 And we've made sure Git is available from that console. 4:11 If you prefer to work on your local computer, 4:14 you'll probably need to install Git first. 4:16 We'll have help on that in the teacher's notes. 4:19 All the commands we show you in work spaces, 4:22 should work the same way in your terminal. 4:24 Now you know what Git can do for you, up next, 4:26 we'll give you an overview of how Git works. 4:28
You need to sign up for Treehouse in order to download course files.Sign up