1 00:00:00,000 --> 00:00:09,750 [MUSIC] 2 00:00:09,750 --> 00:00:13,500 Hi, I'm Jay McGavren, a web developer and teacher at Treehouse, 3 00:00:13,500 --> 00:00:17,780 and I'm here to introduce you to the Git version control system. 4 00:00:17,780 --> 00:00:20,780 Now we know, you're probably itching to get back to coding. 5 00:00:20,780 --> 00:00:23,900 You're probably wondering what a version control system is and 6 00:00:23,900 --> 00:00:25,440 why you'd even need one. 7 00:00:25,440 --> 00:00:29,280 Or if you know what version control systems are, you may be wondering, 8 00:00:29,280 --> 00:00:31,180 why should I choose Git? 9 00:00:31,180 --> 00:00:33,140 If you haven't been a developer very long, 10 00:00:33,140 --> 00:00:35,610 then you may not have lost any of your work. 11 00:00:35,610 --> 00:00:38,090 You haven't accidentally deleted files you need or 12 00:00:38,090 --> 00:00:41,640 introduced a bug you can't find the cause of, yet. 13 00:00:41,640 --> 00:00:45,000 Let me assure you, it's a matter of time before you do. 14 00:00:45,000 --> 00:00:48,610 Version control systems keep old versions of your files for you. 15 00:00:48,610 --> 00:00:52,330 Like a time traveler, you can jump back to earlier versions. 16 00:00:52,330 --> 00:00:55,620 This is really helpful when you make mistakes or delete files, and 17 00:00:55,620 --> 00:00:57,380 want to recover your work. 18 00:00:57,380 --> 00:01:02,350 Think of it like an undo command for an entire project's worth of files. 19 00:01:02,350 --> 00:01:05,300 Version control is so important that many different 20 00:01:05,300 --> 00:01:08,520 version control systems have been created over the years. 21 00:01:08,520 --> 00:01:13,220 Examples include subversion and more recently, Mercurial and Git. 22 00:01:13,220 --> 00:01:16,930 According to the Stack Overflow 2017 developer survey, 23 00:01:16,930 --> 00:01:20,380 Git is now the world's most popular version control system. 24 00:01:20,380 --> 00:01:25,270 With close to 70% of developers using it, when you join a development team, 25 00:01:25,270 --> 00:01:29,100 there's a very good chance they're going to want you to use Git. 26 00:01:29,100 --> 00:01:33,070 Now, we don't wanna mislead you, learning Git will take some work. 27 00:01:33,070 --> 00:01:35,590 For those of you that haven't used the terminal before, 28 00:01:35,590 --> 00:01:39,100 we'll need to give you a brief primer in how to run commands. 29 00:01:39,100 --> 00:01:41,283 And even if you know your way around the Terminal, but 30 00:01:41,283 --> 00:01:45,140 less frequently use Git, commands can be challenging to understand. 31 00:01:45,140 --> 00:01:50,070 But once you know what's going on and have had some practice, Git is easy to use. 32 00:01:50,070 --> 00:01:53,680 The most commonly used commands aren't very complicated. 33 00:01:53,680 --> 00:01:58,070 More importantly, Git is a powerful way to share work across a team. 34 00:01:58,070 --> 00:02:01,540 And because it's distributed, you won't lose all your project's history if 35 00:02:01,540 --> 00:02:05,410 something happens to the central server, as we'll see in the next video. 36 00:02:05,410 --> 00:02:09,100 I've used Git every working day for almost ten years now, and 37 00:02:09,100 --> 00:02:13,130 personally I would never switch back to another version control system. 38 00:02:13,130 --> 00:02:14,800 Git is just that much better. 39 00:02:16,000 --> 00:02:17,970 So Git may take some work to learn, but 40 00:02:17,970 --> 00:02:21,500 let me assure you, the payoff is totally worth it. 41 00:02:21,500 --> 00:02:24,870 And don't worry, we're going to walk you through every step of the way. 42 00:02:24,870 --> 00:02:27,310 We're not going to cover every aspect of Git, but 43 00:02:27,310 --> 00:02:31,870 we are going to cover the most commonly used aspects in careful detail. 44 00:02:31,870 --> 00:02:35,840 We'll show you what the commands mean, how to work with command line options, and 45 00:02:35,840 --> 00:02:37,060 everything else you need to know. 46 00:02:38,150 --> 00:02:42,500 Have your ever heard the phrase, use it or lose it in reference to your memory? 47 00:02:42,500 --> 00:02:47,630 We're bombarded by irrelevant information like advertisements and gossip everyday. 48 00:02:47,630 --> 00:02:50,080 And your brain has evolved to forget most of it. 49 00:02:51,130 --> 00:02:54,500 And your brain could decide to forget the information in this course 50 00:02:54,500 --> 00:02:57,280 unless you convince it this stuff matters. 51 00:02:57,280 --> 00:03:02,440 You tell your brain not to forget a piece of information by using that information. 52 00:03:02,440 --> 00:03:05,130 When you make your brain work to recall something, 53 00:03:05,130 --> 00:03:08,990 your brain decides it's important and keeps it around longer. 54 00:03:08,990 --> 00:03:12,640 That's why we're providing you with quizzes, code challenges, and 55 00:03:12,640 --> 00:03:15,940 other opportunities for practice as part of this course. 56 00:03:15,940 --> 00:03:18,090 Make sure you practice what you've learned, 57 00:03:18,090 --> 00:03:19,820 you'll remember it much better if you do. 58 00:03:21,250 --> 00:03:24,240 Our focus will be to get you up and running with Git. 59 00:03:24,240 --> 00:03:26,510 And then get your code shared on GitHub or 60 00:03:26,510 --> 00:03:29,260 another code hosting site of your choosing. 61 00:03:29,260 --> 00:03:32,340 There's more to Git than that, but we'll be showing you the commands that 62 00:03:32,340 --> 00:03:36,240 even professional developers spend 80% of their time using. 63 00:03:36,240 --> 00:03:39,220 We'll have links in the teacher's notes to resources where you can learn the other 64 00:03:39,220 --> 00:03:40,960 stuff if you want. 65 00:03:40,960 --> 00:03:44,690 Don't hesitate to use the video play back controls during the course. 66 00:03:44,690 --> 00:03:48,130 For the parts you already know, you can put the video on double speed. 67 00:03:48,130 --> 00:03:51,060 For the parts you need to review more closely you can put the video on half 68 00:03:51,060 --> 00:03:53,570 speed, rewind it, or pause it as needed. 69 00:03:55,190 --> 00:03:57,820 It's important to follow along as we go through the course, but 70 00:03:57,820 --> 00:04:00,620 you don't have to have Git installed on your computer. 71 00:04:00,620 --> 00:04:03,040 We have Git pre-installed for you on workspaces, 72 00:04:03,040 --> 00:04:05,740 Treehouse's online development environment. 73 00:04:05,740 --> 00:04:07,230 In addition to a code editor, 74 00:04:07,230 --> 00:04:11,370 workspace includes a console that works just like a Terminal on your computer. 75 00:04:11,370 --> 00:04:14,790 And we've made sure Git is available from that console. 76 00:04:14,790 --> 00:04:16,850 If you prefer to work on your local computer, 77 00:04:16,850 --> 00:04:19,420 you'll probably need to install Git first. 78 00:04:19,420 --> 00:04:22,350 We'll have help on that in the teacher's notes. 79 00:04:22,350 --> 00:04:24,390 All the commands we show you in work spaces, 80 00:04:24,390 --> 00:04:26,520 should work the same way in your terminal. 81 00:04:26,520 --> 00:04:28,800 Now you know what Git can do for you, up next, 82 00:04:28,800 --> 00:04:30,970 we'll give you an overview of how Git works.