Way, way back at the beginning of the course, we introduced you to GitHub. 1
In this module I want to introduce you formally to how Git works and how you can use it to achieve various 2
powerful ends. 3
And I'm going to be talking about and showing you how you can use Git on the command line to do things 4
such as Version Control or how to Clone repositories, how to Fork, make Pull Requests and Merge repositories 5
and a whole bunch of really, really exciting things. 6
So let's talk about Version Control 7
in its simplest form. Let's say that I create a new code file and I write a few lines in it, 8
now, I decide to put it under version control using Git. 9
And let's say that I call this save point Number 1. 10
Now this is my first version. 11
So later on, as I progress, I write maybe a few more lines of code. 12
And at this point I decide to make another save point. 13
And I call this my second version. 14
Further down the line, I accidentally screw up my entire code file and it's irreparable, 15
and I get to the point where I would rather burn my entire code file rather than having to try and fix 16
it. 17
You do get into these situations because very often your code is interlinked and each class depends 18
on another. 19
And sometimes you can screw up in a way where, you know, all hope is lost, 20
and I simply just want to roll back to the last save point. 21
I can do that using Git. 22
You can either compare your current code file so the current mess that you've made against a previous 23
version. 24
So add any of the save points before. 25
Alternatively, you can simply just roll back to a previous version and it doesn't have to be the one 26
that was immediately previous, 27
you can go as far back or as far forwards as you like as long as you know which version you want. 28
In the next lesson, I'm going to show you version control using Git locally on your computer and we're 29
going to use the command line to do this. 30
I'll see you there.