0 1 00:00:00,390 --> 00:00:06,870 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:06,930 --> 00:00:15,170 '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,180 --> 00:00:21,240 that are hosted on Github in order to download the skeleton project and to follow along with the tutorials. 3 4 00:00:21,270 --> 00:00:28,230 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,290 --> 00:00:29,840 various powerful ends. 5 6 00:00:29,880 --> 00:00:35,880 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,880 --> 00:00:43,590 command line to do things such as version control, well how to clone repositories, how to fork make pull 7 8 00:00:43,590 --> 00:00:48,430 requests and merge repositories and a whole bunch of really really exciting things. 8 9 00:00:48,450 --> 00:00:53,950 So once you're ready let's get started and let's start learning about Git. 9 10 00:00:54,030 --> 00:00:57,300 So let's talk about version control in its simplest form. 10 11 00:00:57,420 --> 00:01:01,470 Let's say that I create a new code file and I write a few lines in it. 11 12 00:01:01,470 --> 00:01:04,960 Now I decide to put it under version control using Git 12 13 00:01:05,010 --> 00:01:09,000 and let's say that I call this save point as number 1, 13 14 00:01:09,000 --> 00:01:12,140 now this is my first version. So 14 15 00:01:12,180 --> 00:01:16,600 later on as I progress I write maybe a few more lines of code. 15 16 00:01:16,920 --> 00:01:23,520 And at this point I decide to make another save point and I call this my second version. 16 17 00:01:23,610 --> 00:01:31,170 So further down the line I accidentally screw up my entire code file and it's irreparable and I get 17 18 00:01:31,170 --> 00:01:38,620 to the point where I would rather burn my entire code file rather than having to try and fix it. 18 19 00:01:38,670 --> 00:01:44,430 You do get into these situations because very often your code is interlinked and each class depends 19 20 00:01:44,430 --> 00:01:50,850 on another and sometimes you can screw up in a way where you know all hope is lost and I simply just 20 21 00:01:50,850 --> 00:01:54,560 want to roll back to the last save point. 21 22 00:01:54,630 --> 00:01:56,860 I can do that using Git. 22 23 00:01:57,030 --> 00:01:59,050 I can do that using other tools as well 23 24 00:01:59,100 --> 00:02:02,860 but the most popular tool and the one that we're going to be talking about is Git. 24 25 00:02:02,970 --> 00:02:08,910 So you can either compare your current code file so the current mess that you've made against a previous 25 26 00:02:08,910 --> 00:02:11,590 version so that any of the save points before. 26 27 00:02:11,730 --> 00:02:17,610 Alternatively you can simply just roll back to a previous version and it doesn't have to be the one 27 28 00:02:17,610 --> 00:02:19,520 that was immediately previous. 28 29 00:02:19,530 --> 00:02:25,500 You can go as far back or as far forwards as you like as long as you know which version you want. 29 30 00:02:25,500 --> 00:02:31,560 So in the next lesson I'm going to show you version control using Git locally on your computer. 30 31 00:02:31,560 --> 00:02:33,890 I'm going to use the command line to do this. 31 32 00:02:34,290 --> 00:02:35,160 So I'll see you there.