There.
Welcome back.
So in this section we're going to focus on something brand new.
It's going to be a little bit of a side trip for a moment away from Noad and express and the Yelp camp
and all of the stuff we've been covering.
We're not even we can write javascript h h him out or C Ss for the next few videos.
We're going to focus on something called Get and most of you have probably heard of it or come across
it in some way.
It's very popular and important technology but it's it's very different than what we've done so far
.
It's not really a full language.
It's not something that is actually that complex.
It is a little tricky to really master and to get going at the beginning so I'm not trying to trivialize
that at all but it is it's not like learning javascript or learning all of CCs.
It's scope is much much smaller.
So as I mentioned it is popular.
I still haven't told you what it is really but it is popular.
I just read today that 42 percent of developers use it and I don't know if that's in the US or across
the entire world.
But 42 percent of some population of developers uses it which is more than we can say about a lot of
technologies.
So what it is is a version control system.
So if I go to the official get home page which is get dash as CMD dot com it's not going to be all that
illuminating up front but what it tells us is that it is a free and open source distributed version
control system designed to handle everything from small to very large projects with with speed and efficiency
.
So what is a version control system.
Basically it's a way for us to work with different versions of our code so that we can save different
features and make notes as we progress and have different versions that we can move forwards and backwards
through time.
And then we can also collaborate with other people and incorporate different versions of some code that
I wrote with code that my coworker wrote.
So it's really powerful.
I said a lot of developers use it.
It's definitely important.
You might be wondering why I waited until this point to teach it and I've been I've seen a lot of questions
about that.
People who are starting the course wondering when when recovery get the reason that I didn't teach it
up front.
BUSH I actually have.
Usually they do historically as I spend time teaching get at the beginning.
And we also start with a command line early on.
There's a few reasons really.
One is that it's not that exciting.
And I didn't want to lose people's interest right at the beginning especially in an online course where
it's so easy to check out to not pay attention versus in an online or in an in-person class.
I have you hostage for at least 45 minutes for a lecture where you have said you know you have to try
it.
So I didn't want to discourage people early on on top of that.
It is something that requires the terminal.
So you need to understand command line.
And I didn't want to move command line to the beginning because then we have to talk about cloud 9 and
installation.
And I wanted just to keep it simple at the beginning.
So that's the two of the reasons.
The third one that's most important is that it's really hard to understand the utility of good to really
see why it makes sense when you're working by yourself and when you're just starting out.
So I mentioned that it helps you save different versions and helps you collaborate with people if you
have a huge project it's really beneficial.
But of course the beginning of this class we don't have any huge projects.
We're not collaborating with people.
And even at this point you're not necessarily collaborating.
You're most likely learning on your own.
So it's a little bit hard to really motivate.
Why get is all that useful.
I can I can convince you that it's useful but I don't think I would be able to get you to use it willingly
and get you to want to use it until later in the course.
So we're at that point now we're covering it.
You've also probably heard of get hub if I go back here to our notes these are the big things I want
to talk about.
So what is it.
What is it hub.
They're very different.
They are related maybe very different is too strong of a word but they're not the same thing.
That's a really common misconception with beginners who just kind of lumped them in together.
Get is that technology.
It's totally separate get hub is a Web site.
It's an application that works with get but they're they're not the same thing at all.
So I'm actually going to talk more about what good hub is further down here.
We can work with get and not even know about not care about get hub at all and lots of people do that
though use get but they won't use get hub.
It's not that common but it's possible.
So we're going to focus on just get at the beginning so we talked about these two why you should care
again is that it's really useful.
So that's one thing you will potentially use this a lot especially for it if you end up working with
people whether it's as a contractor or you get a job as a developer.
It's something that lots and lots of teams use.
As I mentioned 42 percent of developers from.
So that's mainly why you should care.
It's also one of those things is just good to have on your resume.
And it's actually not limited only to writing code.
Initially that was what it was kind of created for.
But more recently there's been other applications.
So one of those that I want to talk about is using it to help manage the process of writing a novel
or a play or screenplay.
So imagine that you are a writer and you have some huge story that's in your head that you're going
to sit down and write in and I don't know.
I've tried writing a screenplay before my process was very difficult.
Lots of revisions lots of different drafts that I would save and my process is much the same as my process
for writing essays in college was to write a version and save it as essay V-1 and then if I wanted to
make some other crazy change or I decided I'm going to lead this entire paragraph and try something
totally different.
But I don't want to abandon what I had at the beginning then I would use Save As and make a copy and
have essay V-2.
And every time I wanted to have sort of a checkpoint where I could go back I could revert to my old
draft I could read what I used to have I would create a new document and you as could give it a new
title and usually increment the numbers and eventually I'd get something like this essay like Final
real version.
Pick this on something ridiculous because my name is my naming conventions are wasn't really a convention
but my name and got out of hand.
So that's a problem that get solved or one of the problems is that with get what I can do is have one
essay or one screenplay that I'm working on and use.
Get in and basically tell it to save my files to keep track of them.
I still have to save the files in my text editor.
But what I can do with get is say all right at this point save all these files and I've just added in
the death of the main character and then I could write a little bit more and save again using get and
say that I've now just added in the death of the secondary character and then I could change my mind
and say maybe I should take the story in a different route.
So then I could try something and save another version of it.
Not really a draft but save another version where instead of killing off the two main characters they
both live and they get married and they have kids.
And what I can do later on if you know my editor gets the story and decides you know you really should
of killed them off.
I can easily just using a simple get command.
It's a go back to the point where I saved it where I said that I killed off the main character or where
I said you know X or Y.
Basically you can leave little messages for yourself and it's not only that it's not limited to one
file which is something that's very different from traditional systems of managing your version so on
an essay it's one file that I'm working on.
I save it and then I might save as.
But it's always one file.
What you can do with it get is if you have a huge project so going going to code.
Now if we have a project with 10 javascript files a bunch of CSSA some images HCM lots of different
technologies.
Let's say it's an express app that's lots of folders.
What I can do is target individual pieces and save them using get.
So I can say OK I just created the directory and added in the views for dogs.
And I can save that as a checkpoint that I can come back to later.
And then I could do something later on raid and decide OK just remove the dogs from the views directory
and instead move them into their own dog's directory inside with a view directory.
And I can say that is a checkpoint and then I could do that for all different pieces so usually what
you end up with is at the end of a project you'll have lots and lots of different little commits is
what they're called.
So I'm going to show you a quick example of that and I am going to get hub which again is not the same
as get.
Think of it as a viewer forget a way to share different versions of things to share code with people
.
It's not get itself though.
So this is the express repository on get hub.
And what I want to point out.
So this is the code for express that we've been using when we run NPM install Express.
This code is run well not necessarily run when we install but when we include Express and we execute
it then a lot of this code is run.
What I want to show though is right here.
Five thousand one hundred ninety four commits.
So in the next video we actually write our own commits and I'll show you with that what that looks like
and really what it means.
But take a look at all these messages and there's thousands of them.
So let me just pick an arbitrary one here.
Let's let's look at let's find Harry.
This is fine.
Update exampled dependencies.
If I click on that what I see here are the files that were included in this commit.
So the files that were basically targeted to be saved to make a version of a message that says update
example dependencies.
And I see what was changed.
So we changed the versions.
It looks like Harry whoever wrote this Doug Wilson changed the versions.
So that's a simple example of a commit.
Let's see if we can try to find something a little bit more complex.
All right.
Well here's one or two files so Express is probably 100 plus files across this entire repository.
But in this case someone made a small commit with two changes across two files.
So that's just a few examples.
Feel free to take a look.
Obviously you're not expected to understand the code or all the terminology but take a look and it's
fun to go back to the very beginning.
I actually don't know if there's a really easy way to get to do that just to hop back to the very beginning
but you could try changing this to be page 50 and that takes you back to 2012.
So that's a lot of show of express.
Again we'll return to get her up shortly but we're going to start by talking about get in our terminal
where we're just writing our own code and saving it at different places using get to make our own commits
but we're not going to be sharing those with anyone until we talk about get up.
So the last thing I want to mention is installing get and I have in parentheses.
Not really.
And that's because using Cloud 9 we don't have to install kid ourselves.
It comes installed already when you make a new cloud nine instance.
But if you're not using Cloud 9 if you're using a terminal your own terminal your own shell that you
installed you will have to install it so you can find plenty of instructions online.
Occasionally things go wrong you need some dependencies but it's one of the most installed tools on
in all of web development so there's lots of tutorials resources stack overflow posts everywhere.
But using cloud 9 we don't have to worry about that.
So just to make sure that it works here's the test you can do.
Get dash dash version.
And as long as you see something here it doesn't have to be one point nine point one.
If you're seeing this in the future and you have a different version there that's fine.
All that matters is that you don't see commed not found.
You don't see an error message and that's all we're going to do with get for now in the next lesson
.
We're going to talk about three new commands.
Get a net get ADD and get commit.
All right I'll see if Nelson