1 00:00:00,180 --> 00:00:05,700 In this video you're going to get a high level overview of how we'll be using get to and version control 2 00:00:05,700 --> 00:00:09,030 to track changes to our application over time. 3 00:00:09,030 --> 00:00:13,110 For the moment we're going to stick with exploring this via a visualization. 4 00:00:13,230 --> 00:00:19,410 In the next lecture we'll actually run commands from the command line to integrate and get into our 5 00:00:19,410 --> 00:00:20,540 projects. 6 00:00:20,550 --> 00:00:24,790 So with get end version control typically comes a lot of confusion. 7 00:00:24,810 --> 00:00:30,060 That's because there are a lot of new terms we're going to need to define and concepts we're going to 8 00:00:30,060 --> 00:00:37,140 need to explore once we're familiar with the basics of how get is going to track our files and manage 9 00:00:37,170 --> 00:00:38,370 our project. 10 00:00:38,370 --> 00:00:44,090 It'll be a lot easier to run the commands in the next video and actually understand what's going on. 11 00:00:44,100 --> 00:00:47,190 For this example let's imagine that we have a new project. 12 00:00:47,220 --> 00:00:52,680 So I create an empty directory on my machine and we'll say that I'm building a node application for 13 00:00:52,680 --> 00:00:55,410 serving up a portfolio Web site. 14 00:00:55,410 --> 00:01:00,930 Now I decide that I want to use version control with get and the first thing I would need to do is run 15 00:01:00,930 --> 00:01:05,560 a command to initialize get in that new project folder. 16 00:01:05,610 --> 00:01:10,050 We'll talk about what the command is in the next video and you'll actually run it. 17 00:01:10,050 --> 00:01:16,200 But for the moment it's enough to know that you have to start up get in every project where you want 18 00:01:16,260 --> 00:01:17,430 to use it. 19 00:01:17,460 --> 00:01:23,460 Now once get is initialized you can start to add files into your project and that is where these four 20 00:01:23,460 --> 00:01:25,750 columns are going to come into place. 21 00:01:25,770 --> 00:01:31,040 We have unattractive files on staged changes staged changes. 22 00:01:31,050 --> 00:01:33,300 And finally we have commits. 23 00:01:33,330 --> 00:01:37,270 Let's get started with the first column which is unattractive files. 24 00:01:37,320 --> 00:01:42,870 So by default get doesn't track files you add to your application you're gonna have to run commands 25 00:01:42,930 --> 00:01:46,230 telling get that you want to track specific files. 26 00:01:46,230 --> 00:01:52,440 So if we were to add a couple new files to our project they would show up as entourage files. 27 00:01:52,440 --> 00:02:00,390 I'll add source forward slash app dot J S A NOTE J.S. script then down below I'll add read me dot M.D. 28 00:02:00,660 --> 00:02:05,080 a markdown file which contains the documentation for our project. 29 00:02:05,130 --> 00:02:11,550 So by default all new files you add to your project will show up under contract files. 30 00:02:11,550 --> 00:02:16,980 Now at this point we can start the process of getting them into commits when something has been committed 31 00:02:17,040 --> 00:02:19,650 to get get is indeed tracking it. 32 00:02:19,650 --> 00:02:21,700 And that's a two step process. 33 00:02:21,720 --> 00:02:27,660 The first thing we do is we move everything we want to commit over to staged changes. 34 00:02:27,720 --> 00:02:29,920 So this is where we put things we want to save. 35 00:02:29,940 --> 00:02:34,030 And then when we save all of these things get bundled up into a commit. 36 00:02:34,140 --> 00:02:36,620 Let's go ahead and see what that really looks like. 37 00:02:36,630 --> 00:02:41,050 So we would run a get ad command which we'll use in the next video. 38 00:02:41,070 --> 00:02:47,010 This is going to allow us to take one or more files from Entourage files and bring it over to staged 39 00:02:47,070 --> 00:02:48,160 changes. 40 00:02:48,180 --> 00:02:54,210 In this case I'll just bring one file over leaving the other an entourage files I could bring both over 41 00:02:54,210 --> 00:02:58,410 if I wanted to or I could just bring over the one now from here. 42 00:02:58,410 --> 00:03:04,260 As I mentioned Stage Two changes contains the things that are going to be included in the next commit 43 00:03:04,350 --> 00:03:06,660 the next save point if you will. 44 00:03:06,900 --> 00:03:12,570 The next step in the process would be to actually create a commit using the commit command which we'll 45 00:03:12,570 --> 00:03:16,710 also use in the next video when we use the commit command. 46 00:03:16,710 --> 00:03:23,010 It's gonna take all of the files in staged changes in this case just the one it is going to bundle them 47 00:03:23,010 --> 00:03:27,100 up into a single commit and that is going to show up over here. 48 00:03:27,120 --> 00:03:29,640 Now each commit has a unique identifier. 49 00:03:29,670 --> 00:03:35,820 In reality it's a bit longer than this but for this I've picked a random set of characters one a B for 50 00:03:35,880 --> 00:03:36,370 nine. 51 00:03:36,890 --> 00:03:41,100 So after running those two commands get add and get commit. 52 00:03:41,100 --> 00:03:44,130 We would have a set up that looks a little bit like this. 53 00:03:44,130 --> 00:03:50,640 We have a single commit tracking some changes to our project and we have a single entourage file read 54 00:03:50,640 --> 00:03:52,030 me dot M.D.. 55 00:03:52,050 --> 00:03:55,280 Now let's say we're ready to continue on with the project. 56 00:03:55,290 --> 00:04:01,120 We add a new script into the project and as we know that's gonna show up under contract files. 57 00:04:01,200 --> 00:04:07,170 So I add geo coded J.S. in the source you tells directory and that's sitting right here in Entourage 58 00:04:07,170 --> 00:04:10,500 files alongside of Read Me dot M.D.. 59 00:04:10,530 --> 00:04:14,270 Now we've included this new script in the project and it's time to use it. 60 00:04:14,310 --> 00:04:21,380 So we make some changes to app J S requiring this file and actually calling the function it provides. 61 00:04:21,540 --> 00:04:29,430 When we make a change to a file that is already tracking that comes in under UN staged changes. 62 00:04:29,430 --> 00:04:36,180 Now what categorizes a file that get his tracking it is a file that has been included in a previous 63 00:04:36,180 --> 00:04:37,740 comment in this case. 64 00:04:37,770 --> 00:04:44,340 Source forward slash app Doc J S was the only file included in the only previous comment so this would 65 00:04:44,340 --> 00:04:48,390 be the only thing currently under onstage changes. 66 00:04:48,480 --> 00:04:51,550 So now at this point we're going to make another commit. 67 00:04:51,560 --> 00:04:53,590 Remember that's a two step process. 68 00:04:53,610 --> 00:04:57,300 We bring the things we want to commit over to stage changes. 69 00:04:57,300 --> 00:05:01,930 Then we make the commit taking all of this bundling it up in a new commit. 70 00:05:01,970 --> 00:05:08,810 So right here I'm gonna use the ad command once again to bring two things over to the staging area. 71 00:05:08,810 --> 00:05:15,080 I'm gonna bring over source forward slash app not J.S. and I'll bring over geo code and J.S. from the 72 00:05:15,080 --> 00:05:17,270 source utilize directory. 73 00:05:17,300 --> 00:05:22,850 Now I could also choose to bring over read me M.D. but on leaving that there to let you know you don't 74 00:05:22,850 --> 00:05:25,070 have to have get track everything. 75 00:05:25,310 --> 00:05:30,800 So once the ad command is done our setup is going to look a little bit like this and then we can use 76 00:05:30,800 --> 00:05:35,680 the comet command to take all of this and create a brand new commit. 77 00:05:35,720 --> 00:05:38,390 So right here I use the comet command. 78 00:05:38,390 --> 00:05:43,080 It bundles up everything in staged changes and it puts them in a new commit. 79 00:05:43,400 --> 00:05:48,290 Now at this point in the process we have two comets inside of our setup. 80 00:05:48,320 --> 00:05:53,430 We can revert back to those commits to get the application at that point in time. 81 00:05:53,450 --> 00:05:57,790 So at this point in time with the first comet we had a single file app. 82 00:05:57,860 --> 00:06:01,010 J.S. in its old state with the second comet. 83 00:06:01,010 --> 00:06:09,050 We now have two files we have geo code that J.S. and we have at J.S. in its updated state as we continue 84 00:06:09,050 --> 00:06:11,240 to add new features to our project. 85 00:06:11,240 --> 00:06:16,970 We can create new comets and those will show up over here alongside of our two initial ones. 86 00:06:17,220 --> 00:06:19,730 And that's where we're going to stop for this video. 87 00:06:19,730 --> 00:06:24,380 The goal of this video wasn't to get us to the point where we've mastered get the goal is to just get 88 00:06:24,380 --> 00:06:30,500 us familiar with a couple of basic concepts related to get things like Entourage files which are new 89 00:06:30,500 --> 00:06:38,750 files added to the project onstage changes which are changes to files that get is already tracking stage 90 00:06:38,750 --> 00:06:44,780 changes which are things that are about to be committed and commits which are the various save points 91 00:06:44,810 --> 00:06:50,840 as we've built out and changed the files in our application in the next video we're going to put all 92 00:06:50,840 --> 00:06:55,510 of this into practice and actually run get commands from our project. 93 00:06:55,520 --> 00:06:56,720 I'm excited to get to it. 94 00:06:56,780 --> 00:06:58,840 So let's jump right in to the next one.