0 1 00:00:00,450 --> 00:00:06,930 So, way, way back at the beginning of the course, we introduced you to Git and GitHub as a part of the 1 2 00:00:07,140 --> 00:00:15,200 I Am Poor Challenge. And that was just to show you how Git works and how you can use GitHub, or our repositories 2 3 00:00:15,210 --> 00:00:21,300 are hosted on GItHub in order to download the skeleton projects and to follow along with the tutorials. 3 4 00:00:21,330 --> 00:00:28,260 Now, in this module, I want to introduce you formally to how Git works and how you can use it to achieve 4 5 00:00:28,350 --> 00:00:29,870 very powerful end. 5 6 00:00:29,940 --> 00:00:35,940 And I'm going to be talking about and showing you how you can use Git both inside Xcode and on the 6 7 00:00:35,940 --> 00:00:43,620 command line to do things, such as version control, well, how to clone repositories, how to fork, make pull 7 8 00:00:43,620 --> 00:00:48,490 requests, and merge repositories, and a whole bunch of really, really exciting things. 8 9 00:00:48,510 --> 00:00:53,990 So, once you're ready, let's get started, and let's start learning about Git. 9 10 00:00:54,090 --> 00:00:57,350 So let's talk about version control in its simplest form. 10 11 00:00:57,480 --> 00:01:01,530 Let's say that I create a new code file and I write a few lines in it. 11 12 00:01:01,530 --> 00:01:05,010 Now, I decide to put it under version control using Git. 12 13 00:01:05,070 --> 00:01:09,060 And let's say that I call this save point as number one. 13 14 00:01:09,060 --> 00:01:12,210 Now, this is my first version. 14 15 00:01:12,240 --> 00:01:14,000 So later on, as I progress, 15 16 00:01:14,010 --> 00:01:21,300 I write maybe a few more lines of code. And at this point, I decide to make another save point, and I call 16 17 00:01:21,300 --> 00:01:23,330 this my second version. 17 18 00:01:23,680 --> 00:01:31,230 So, further down the line, I accidentally screw up my entire code file and it's irreparable, and I get 18 19 00:01:31,230 --> 00:01:38,670 to the point where I would rather burn my entire code file, rather than having to try and fix it. 19 20 00:01:38,700 --> 00:01:44,490 You do get into these situations because very often your code is interlinked and each class depends 20 21 00:01:44,490 --> 00:01:50,910 on another and sometimes you can screw up in a way where, you know, all hope is lost, and I simply just 21 22 00:01:50,910 --> 00:01:54,590 want to roll back to the last save point. 22 23 00:01:54,660 --> 00:01:56,930 I can do that using Git. 23 24 00:01:57,090 --> 00:01:59,110 I can do that using other tools as well. 24 25 00:01:59,160 --> 00:02:02,910 But the most popular tool and the one that we're going to be talking about is Git. 25 26 00:02:03,030 --> 00:02:08,970 So you can either compare your current code file, so the current mess that you've made against a previous 26 27 00:02:08,970 --> 00:02:11,640 version, so at any of the save points before. 27 28 00:02:11,790 --> 00:02:17,640 Alternatively, you can simply just roll back to a previous version, and it doesn't have to be the one 28 29 00:02:17,640 --> 00:02:19,580 that was immediately previous. 29 30 00:02:19,590 --> 00:02:25,530 You can go as far back or as far forward as you like as long as you know which version you want. 30 31 00:02:25,530 --> 00:02:31,610 So in the next lesson, I'm going to show you version control using Git locally on your computer. 31 32 00:02:31,620 --> 00:02:34,190 We're going to use the command line to do this. 32 33 00:02:34,350 --> 00:02:35,190 So I'll see you there.