In the last lectures,
we had a look at command line-based computer interaction.
Now it's time to dive into the actual core content
of this module, and this is learning Git and GitHub,
therefore let's get started
with the Git installation on Mac computers.
Now you can find Git, here, if you will forget,
and then this git-scm.com is the link
we have to use right here.
With this, we are on the Git website.
In here you can find some general information about Git,
but the most important information, here,
is on this, well, screen down here to the right.
There, you can download
the latest source release version of Git.
In my case, this is 2.32.
At the point in time, where you are watching this video,
this might already be a later version.
By clicking onto this Download for Mac button, here,
you are redirected to this page because downloading
and installing Git can be done in different ways.
I'll go with the first one, here, with the Homebrew way.
Homebrew is a package installer for Mac systems,
and it makes installing it very easy.
For this, we first have to look for Homebrew.
Right here, so this is German here,
so this brew.sh is the correct website, let's select this.
And, here, we can now simply install Homebrew,
well, by copying this code, here, into our terminal.
With that, let's bring up a terminal window.
Here it is.
Let's now paste this, well, code, here,
and let's confirm this.
Now we have to enter our computer's password,
and, with that, Homebrew will be installed automatically.
We have to press return to continue here, we'll do that.
So this can take a few moments.
So don't worry if this takes a bit longer,
that's totally normal, we have to download
some things, here, to make this whole package manager work.
And, now, the installation is finally done.
As I said, this can take a few minutes
so don't wonder if you have to wait a bit,
but the cool thing, now, is that with Homebrew
we can now easily install Git.
Let's go back to the Git page,
and let's close this maybe,
and, here, we see the only thing you have to run now
is brew install git.
Guess we can do this, so brew install git.
So we're using this package manager, now,
to install the latest Git version, so let's do this.
This shouldn't take that long, let's see.
With this, the installation is finished
and what we should do now is we should check
whether the installation was successful.
To do this, we can write our first Git command already.
Git commands always start with git, the Git keyword
to, well, tell the computer that we want to interact
with Git, in here, that we want to execute Git commands,
then a space, and then the command that you want to run.
Here, we want to check the installed Git version,
and this can be done by adding two dashes
and then the version keyword here.
With this, by hitting enter,
we should see that the latest Git version
that we installed is 2.32,
so the one that we saw on the website.
In case the installation doesn't show this latest version,
right here, then you can simply close the terminal window,
up here in Terminal and then Quit Terminal,
and then you can start a new terminal.
Because sometimes Homebrew also installs
older versions of Git, well, when installing Homebrew,
and, because of that, the updated version
might not be displayed correctly, here,
in this terminal window.
But, as I said, starting a new terminal
and then running git --version should do the trick here.
With this, we installed Git on our MacOS computer.
If you also want to find out how this works
on Windows machines, feel free to dive
into the next lecture,
otherwise you can skip the next lecture
and continue with the lecture afterwards.