1 00:00:00,240 --> 00:00:04,640 In the last video you created accounts with both get hub and Heroku. 2 00:00:04,740 --> 00:00:10,860 Now in the end of the day both of those tools they need access to our project code Heroku is going to 3 00:00:10,860 --> 00:00:16,950 need access to the project code so it can actually deploy our node applications and get how it needs 4 00:00:16,950 --> 00:00:23,130 access to the project code so it can show it on the project home page allowing us to collaborate with 5 00:00:23,160 --> 00:00:28,730 others track code changes over time or manage issues in our application. 6 00:00:28,740 --> 00:00:34,490 Either way we need a reliable way to get our code to both of those services. 7 00:00:34,500 --> 00:00:39,840 Now the answer is not to just zip up the folder and send it off to those services. 8 00:00:39,840 --> 00:00:46,470 The answer is to use version control with get in this video we're going to talk about what version control 9 00:00:46,470 --> 00:00:53,460 is and what get is will get get installed and that's going to allow us to actually use it in the next 10 00:00:53,460 --> 00:00:54,870 video to get started. 11 00:00:54,930 --> 00:01:01,740 Let's talk about what exactly version control is version control allows you to manage the versions of 12 00:01:01,740 --> 00:01:03,680 your application over time. 13 00:01:03,780 --> 00:01:10,680 So imagine the web server project as we add new features or change code with version control we can 14 00:01:10,680 --> 00:01:17,910 track those changes we can create what are essentially save points along the way for the various versions 15 00:01:17,970 --> 00:01:19,390 of our application. 16 00:01:19,440 --> 00:01:21,150 Now why is that useful. 17 00:01:21,150 --> 00:01:26,860 Well imagine you had an application and you had a thousand users who were paying you for that app. 18 00:01:26,940 --> 00:01:31,950 You want to add a new feature to give your users something new and exciting so you make some changes 19 00:01:31,950 --> 00:01:34,220 to your project and you deploy it. 20 00:01:34,230 --> 00:01:37,710 Now let's say that you discover that something's wrong with that new feature. 21 00:01:37,710 --> 00:01:38,550 There's a bug. 22 00:01:38,580 --> 00:01:39,880 So what do you want to do. 23 00:01:39,930 --> 00:01:45,120 You want to revert to the previous working state then you want to spend a little more time working on 24 00:01:45,120 --> 00:01:50,370 that new feature and when it's ready and the bug is fixed you'll deploy it back to your users. 25 00:01:50,370 --> 00:01:56,460 That's a very simple workflow but without version control you're not going to have an easy way to revert 26 00:01:56,460 --> 00:01:59,880 back to a previous working state of your application. 27 00:01:59,880 --> 00:02:05,730 The only version of the project you have is the broken one you're locally saved files unless you have 28 00:02:05,730 --> 00:02:09,330 a picture perfect memory and a lot of spare time on your hands. 29 00:02:09,390 --> 00:02:15,240 You're not going to be able to revert to the application back to its previously working state with version 30 00:02:15,240 --> 00:02:15,950 control. 31 00:02:16,020 --> 00:02:18,180 You could do that in about a second. 32 00:02:18,360 --> 00:02:21,130 So without version control you are living on the edge. 33 00:02:21,150 --> 00:02:25,350 If anything goes wrong it's going to be a big problem. 34 00:02:25,410 --> 00:02:30,160 You're going to have to manually work with all of these files to figure out what went wrong or you're 35 00:02:30,160 --> 00:02:34,270 going to have to rewrite them if they get lost with version control. 36 00:02:34,290 --> 00:02:35,300 You're in the clear. 37 00:02:35,340 --> 00:02:40,890 You can experiment and try different ways to approach problems if solution one doesn't work. 38 00:02:40,890 --> 00:02:46,600 You can revert those changes in a second and you can try to approach the problem from a different angle. 39 00:02:46,620 --> 00:02:52,500 It gives you flexibility and confidence knowing you can experiment with your code but always get back 40 00:02:52,500 --> 00:02:54,720 to that working state you had before. 41 00:02:54,720 --> 00:03:00,630 Without wasting your time and energy you should be using version control for every personal and professional 42 00:03:00,630 --> 00:03:02,120 project you're working on. 43 00:03:02,370 --> 00:03:08,430 If you're willing to spend time writing code it's best to spend an extra 10 seconds to integrate version 44 00:03:08,430 --> 00:03:14,700 control allowing you to track those version changes over time and manage your application code with 45 00:03:14,850 --> 00:03:15,740 ease. 46 00:03:15,750 --> 00:03:19,610 Now in this course we'll be using the get version control system. 47 00:03:19,620 --> 00:03:25,770 There are other version control tools out there but it is by far the most popular and the most widely 48 00:03:25,770 --> 00:03:27,670 used and for a good reason. 49 00:03:27,750 --> 00:03:33,330 It's super fast and easy to work with and you can use get regardless of the programming language you're 50 00:03:33,330 --> 00:03:34,310 working with. 51 00:03:34,410 --> 00:03:41,790 You could use get with Java with an iPhone application or in our case with node j s we can install and 52 00:03:41,790 --> 00:03:44,640 learn more about get over in the browser. 53 00:03:44,670 --> 00:03:52,420 I'm going to change the documentation you are all over to get hyphen s CRM dot com here. 54 00:03:52,440 --> 00:03:57,270 There are a ton of great resources that teach you how to use get that will cover the basics and the 55 00:03:57,270 --> 00:03:58,060 class. 56 00:03:58,080 --> 00:04:04,980 And here we can also install these get tools allowing us to integrate version control into our programming 57 00:04:04,980 --> 00:04:05,830 projects. 58 00:04:05,850 --> 00:04:09,380 Right here you should see the installer for your operating system. 59 00:04:09,380 --> 00:04:12,630 Here I have the installer for Mac and down below. 60 00:04:12,630 --> 00:04:15,080 I just want to point you to one more resource. 61 00:04:15,120 --> 00:04:20,580 There is a book called Pro get it's a free book and it's available to read right here on the get to 62 00:04:20,580 --> 00:04:21,510 Web site. 63 00:04:21,510 --> 00:04:26,520 I definitely recommend checking it out as you continue on with your development career. 64 00:04:26,520 --> 00:04:32,520 If you move into any real development position they're gonna be using get most likely and knowing how 65 00:04:32,650 --> 00:04:36,080 it works is going to allow you to get up and running quickly. 66 00:04:36,090 --> 00:04:41,340 For now though let's go ahead and just grab the installer so we can use get in our project. 67 00:04:41,340 --> 00:04:46,860 This is going to download what you need in order to get the tools set up and once again this is going 68 00:04:46,860 --> 00:04:50,220 to give us access to something new from the terminal. 69 00:04:50,220 --> 00:04:52,080 It looks like the download hasn't started. 70 00:04:52,080 --> 00:04:58,860 I can always click there to manually grab it from source forge dot net and once we do have it installed 71 00:04:59,100 --> 00:05:00,840 we'll explore the very basics. 72 00:05:00,850 --> 00:05:03,930 Throughout the next several videos down below. 73 00:05:03,940 --> 00:05:06,550 It is indeed downloading what we need. 74 00:05:06,550 --> 00:05:12,220 I'm gonna go ahead and run the installer for my operating system and once again this is one of those 75 00:05:12,220 --> 00:05:14,170 click Next installers. 76 00:05:14,260 --> 00:05:20,260 If you're on Windows though at some point throughout the options menu it's going to ask you if you want 77 00:05:20,260 --> 00:05:23,200 to install something called Get bash. 78 00:05:23,200 --> 00:05:28,990 You have to check that option if you don't you're gonna have to reinstall get later in the course to 79 00:05:28,990 --> 00:05:31,270 get access to get bash. 80 00:05:31,270 --> 00:05:36,610 This is going to allow you to perform some operations that you would otherwise not be able to perform 81 00:05:36,640 --> 00:05:37,600 on Windows. 82 00:05:37,600 --> 00:05:45,280 So once again for Windows users only make sure to check the option in the installer that installs get 83 00:05:45,430 --> 00:05:46,400 bash. 84 00:05:46,480 --> 00:05:48,160 Right here I'm on a Mac. 85 00:05:48,220 --> 00:05:50,380 I'm going to double click that installer. 86 00:05:50,440 --> 00:05:56,460 Actually I need to right click it and click open so I can verify that I want to install this software 87 00:05:56,470 --> 00:05:57,090 from the Web. 88 00:05:57,580 --> 00:06:03,100 And once again as mentioned this is just the type of installer where we click Next a few times unless 89 00:06:03,100 --> 00:06:04,060 you're on Windows. 90 00:06:04,060 --> 00:06:07,870 Make sure to check the get bash installation option. 91 00:06:07,930 --> 00:06:13,210 Now once things are done we're gonna go ahead and restart the terminal once again from Visual Studio 92 00:06:13,210 --> 00:06:17,340 code and we're gonna make sure everything got installed correctly. 93 00:06:17,350 --> 00:06:19,290 I'm going to trash the installer. 94 00:06:19,420 --> 00:06:22,180 I'm gonna head over to visual studio code. 95 00:06:22,240 --> 00:06:29,350 I'll use the trash can to close the terminal then I'll open up a new one right here terminal new terminal 96 00:06:29,950 --> 00:06:30,460 from here. 97 00:06:30,460 --> 00:06:36,490 We're gonna use get which is the command we got access to when we installed get we'll be using all sorts 98 00:06:36,490 --> 00:06:40,900 of get commands throughout this section and throughout the rest of the class. 99 00:06:40,960 --> 00:06:46,450 All we're going to do in this video is make sure it installed correctly by checking the version we have 100 00:06:46,450 --> 00:06:48,260 installed on our machines. 101 00:06:48,310 --> 00:06:51,370 That is get space hyphen hyphen version. 102 00:06:51,370 --> 00:06:57,190 If I run this it's gonna print the version of Get I have installed which is two point nineteen point 103 00:06:57,250 --> 00:06:58,010 two. 104 00:06:58,060 --> 00:07:04,420 Now the exact version of Get you're using is not particularly important as long as you're using V2 or 105 00:07:04,420 --> 00:07:05,140 greater. 106 00:07:05,260 --> 00:07:09,690 If you're seeing v 0 or v 1 as that first number that's a problem. 107 00:07:09,790 --> 00:07:13,800 Now you shouldn't be seeing that as you just installed the tool. 108 00:07:13,960 --> 00:07:19,090 So right here we do indeed have get installed correctly and throughout the section we're gonna start 109 00:07:19,090 --> 00:07:24,580 to put our project under version control to keep track of its changes over time. 110 00:07:24,700 --> 00:07:30,010 Then we're gonna be able to take those changes and we're gonna be able to send them off to the github 111 00:07:30,010 --> 00:07:34,510 servers and the Heroku servers by running commands from the terminal. 112 00:07:34,510 --> 00:07:40,000 That is how we're gonna send our code off to those third party services. 113 00:07:40,000 --> 00:07:46,000 Now we're gonna talk more about what get is and how it's going to work for our application files in 114 00:07:46,000 --> 00:07:47,720 the very next video. 115 00:07:47,740 --> 00:07:49,030 I'm excited to get to that. 116 00:07:49,090 --> 00:07:50,970 So let's go ahead and jump right in.