So, way, way back at the beginning of the course, we introduced you to Git and GitHub as a part of the 1
I Am Poor Challenge. And that was just to show you how Git works and how you can use GitHub, or our repositories 2
are hosted on GItHub in order to download the skeleton projects and to follow along with the tutorials. 3
Now, in this module, I want to introduce you formally to how Git works and how you can use it to achieve 4
very powerful end. 5
And I'm going to be talking about and showing you how you can use Git both inside Xcode and on the 6
command line to do things, such as version control, well, how to clone repositories, how to fork, make pull 7
requests, and merge repositories, and a whole bunch of really, really exciting things. 8
So, once you're ready, let's get started, and let's start learning about Git. 9
So let's talk about version control in its simplest form. 10
Let's say that I create a new code file and I write a few lines in it. 11
Now, I decide to put it under version control using Git. 12
And let's say that I call this save point as number one. 13
Now, this is my first version. 14
So later on, as I progress, 15
I write maybe a few more lines of code. And at this point, I decide to make another save point, and I call 16
this my second version. 17
So, further down the line, I accidentally screw up my entire code file and it's irreparable, and I get 18
to the point where I would rather burn my entire code file, rather than having to try and fix it. 19
You do get into these situations because very often your code is interlinked and each class depends 20
on another and sometimes you can screw up in a way where, you know, all hope is lost, and I simply just 21
want to roll back to the last save point. 22
I can do that using Git. 23
I can do that using other tools as well. 24
But the most popular tool and the one that we're going to be talking about is Git. 25
So you can either compare your current code file, so the current mess that you've made against a previous 26
version, so at any of the save points before. 27
Alternatively, you can simply just roll back to a previous version, and it doesn't have to be the one 28
that was immediately previous. 29
You can go as far back or as far forward as you like as long as you know which version you want. 30
So in the next lesson, I'm going to show you version control using Git locally on your computer. 31
We're going to use the command line to do this. 32
So I'll see you there.