So we manually deployed our project to Netlify,
which is already great of course,
but we can do a lot better because we as web developers,
don't like to do things manually.
So we like to automate things.
And so that's where Git comes into play.
So in this lecture we're going to install
and set up Git on your computer,
and also open a free account@github.com.
Now, if you're already familiar with Git and GitHub
then please mark this video and the next ones as completed,
and then simply move on to the video where we actually
deploy the project to Netlify using GitHub.
Now, okay.
So let's start by opening up the Git website.
So that's going to be gitscm
And so this is where we will download Git from.
So Git is version control,
as it says right here.
So it is a software that runs on your computer
and you can basically use Git to save snapshots
of your code over time.
And then if you need you can go back in time,
like two older versions of your code,
if you need to recover some mistake for example,
and that is really just a tip of the iceberg of everything
that you can do with Git.
But anyway, let's now download this software
and then install it.
So probably the easiest way of doing it is to click here on
this installer for your operating system.
So find this installer here somewhere on your page.
So if you're on windows probably this looks different,
but somewhere you will find a link for an installer
and then simply download that
and install it on your computer.
Of course I already have Git.
And so I will wait for you to finish your installation.
Now okay.
So I hope you successfully installed
Git on your computer.
And so let's now go back to our code
and start a so-called repository.
So let's clear the console here
and then make sure that in your terminal,
you are in the project folder.
So here in this Forkify of folder
and not inside of any of these child folders
so really the parent folder
where your entire application lifts.
And so now we can write,
git init.
Hit enter.
And so here you see,
we initialized an empty Git repository in this folder here.
Then I get this warning here which asks me if I would like
to add node modules to gitignore
And if you get the same warning, then please click.
Yes.
But if you don't then nevermind,
we will talk about that in the next video.
For now what matters here is that you understand
that basically a repository or as we also call it a repo
is the fundamental concept of Git.
So right now in this Forkify folder,
we created a local repository,
which will eventually contain all of our code here.
So all this code,
which is right now marked in this orange color.
So you see it that changed
as soon as we initialized this Git repository.
So that means that Darryl is actually a very tight
integration between Git and VS code.
And that is because really
all software developers work with Git,
so everyone needs these features
and stair for VS code has this very tight integration.
Now, right now
none of these files are already in our repository,
but for now we will actually not add them.
So I will leave that for the next lecture,
because in this one all I wanted to do is to configure Git
and also to open an account on GitHub next.
And so that's actually go do that.
So let's,
search for GitHub.
And so then it's github.com.
Now we need GitHub or any other service that is similar to
GitHub in order to basically store
or local repository in the cloud.
So eventually of course
we will have some code here in this repository,
and then we will want to save that repository online.
So for example,
that we can switch between computers
or that we can make sure that our code never gets lost.
And so for that we need an account on some service,
like GitHub and there's also GitLab,
or I think GitBucket or something like that.
But GitHub is by far the most popular one.
And so let's open up an account here
in case you don't have one yet
Now, okay.
And this is probably how GitHub
will look like for you after you log in.
But for now that's not so important.
Again, we will start working with it in the next lecture.
For now, what I want to do here
is to basically connect your local Git installation
with your GitHub account.
And so let's do some configuration here.
So we type Git and by the way as you see,
Git is basically a command line interface from which we can
use the software and really do all kinds of stuff.
Now, there are also some graphical user interfaces for Git
which many people that don't like to command line prefer.
But actually in my opinion,
I think that it's easier to use Git on the command line.
All right.
But anyway, what I want to do now here is git config
and then the option of global.
And so this will then work in all the reposts you ever
create on your computer and then user.name.
And then set this to your username
that you just chose on GitHub.
So for me that would be like, Jonah's Schmidt
or something like that.
So do this, so write your username
and then hit enter.
Which I will not do.
And then write the same thing again.
So git config global user and this one email,
and then here specify the email that you used on GitHub.
And so with this it will then become a lot easier
to basically connect your local repositories with GitHub.
Okay.
And that's actually it for this set of video
in the next lecture we will then actually start using Git.
And after this three part intro to Git
so after this lecture in the next two ones,
you will be able to start using it in your own projects.
And that's actually really important.
So you really need to start using Git
because you will use Git in every web development job
that you will ever find.
So every developer uses Git
and also GitHub every single day.