In this module, I want to introduce you
to how Git works
and how you can use it to achieve various powerful ends.
And I'm going to be talking about
and showing you how you can use Git
on the command line to do things such as Version Control
or how to Clone Repositories,
how to Fork, make Pull Requests, and Merge Repositories
and a whole bunch of really, really exciting things.
So let's talk about Version Control in its simplest form.
Let's say that I create a new code file
and I write a few lines in it.
Now I decide to put it under version control using Git
and let's say that I call this save point number one.
Now this is my first version, so later on as I progress
I write maybe a few more lines of code.
And at this point I decide to make another save point
and I call this my second version.
Further down the line, I accidentally screw up
my entire code file and it's irreparable,
and I get to the point
where I would rather burn my entire code file
rather than having to try and fix it.
You do get into these situations
because very often your code is interlinked
and each class depends on another,
and sometimes you can screw up
in a way where you know all hope is lost,
and I simply just want to roll back to the last save point.
I can do that using Git.
You can either compare your current code file,
so the current mess that you've made,
against a previous version,
so at any of the save points before.
Alternatively, you can simply just roll back
to a previous version,
and it doesn't have to be the one
that was immediately previous.
You can go as far back or as far forwards as you like,
as long as you know which version you want.
In the next lesson, I'm going to show you Version Control
using Git locally on your computer,
and we're going to use the command line to do this.
So I'll see you there.