1
00:00:02,500 --> 00:00:03,770
In the last lectures,

2
00:00:03,770 --> 00:00:07,689
we had a look at command line-based computer interaction.

3
00:00:07,689 --> 00:00:11,260
Now it's time to dive into the actual core content

4
00:00:11,260 --> 00:00:15,100
of this module, and this is learning Git and GitHub,

5
00:00:15,100 --> 00:00:16,900
therefore let's get started

6
00:00:16,900 --> 00:00:20,710
with the Git installation on Mac computers.

7
00:00:20,710 --> 00:00:23,170
Now you can find Git, here, if you will forget,

8
00:00:23,170 --> 00:00:26,040
and then this git-scm.com is the link

9
00:00:26,040 --> 00:00:27,800
we have to use right here.

10
00:00:27,800 --> 00:00:31,270
With this, we are on the Git website.

11
00:00:31,270 --> 00:00:35,260
In here you can find some general information about Git,

12
00:00:35,260 --> 00:00:37,530
but the most important information, here,

13
00:00:37,530 --> 00:00:41,770
is on this, well, screen down here to the right.

14
00:00:41,770 --> 00:00:43,060
There, you can download

15
00:00:43,060 --> 00:00:46,190
the latest source release version of Git.

16
00:00:46,190 --> 00:00:49,080
In my case, this is 2.32.

17
00:00:49,080 --> 00:00:51,890
At the point in time, where you are watching this video,

18
00:00:51,890 --> 00:00:54,733
this might already be a later version.

19
00:00:55,820 --> 00:00:59,483
By clicking onto this Download for Mac button, here,

20
00:01:00,500 --> 00:01:04,170
you are redirected to this page because downloading

21
00:01:04,170 --> 00:01:08,123
and installing Git can be done in different ways.

22
00:01:09,040 --> 00:01:12,580
I'll go with the first one, here, with the Homebrew way.

23
00:01:12,580 --> 00:01:16,620
Homebrew is a package installer for Mac systems,

24
00:01:16,620 --> 00:01:18,800
and it makes installing it very easy.

25
00:01:18,800 --> 00:01:22,360
For this, we first have to look for Homebrew.

26
00:01:22,360 --> 00:01:24,230
Right here, so this is German here,

27
00:01:24,230 --> 00:01:29,230
so this brew.sh is the correct website, let's select this.

28
00:01:30,070 --> 00:01:32,510
And, here, we can now simply install Homebrew,

29
00:01:32,510 --> 00:01:36,653
well, by copying this code, here, into our terminal.

30
00:01:37,880 --> 00:01:40,173
With that, let's bring up a terminal window.

31
00:01:41,280 --> 00:01:42,710
Here it is.

32
00:01:42,710 --> 00:01:46,080
Let's now paste this, well, code, here,

33
00:01:46,080 --> 00:01:47,610
and let's confirm this.

34
00:01:47,610 --> 00:01:50,830
Now we have to enter our computer's password,

35
00:01:50,830 --> 00:01:53,650
and, with that, Homebrew will be installed automatically.

36
00:01:53,650 --> 00:01:57,270
We have to press return to continue here, we'll do that.

37
00:01:57,270 --> 00:01:58,853
So this can take a few moments.

38
00:01:59,960 --> 00:02:01,910
So don't worry if this takes a bit longer,

39
00:02:01,910 --> 00:02:04,060
that's totally normal, we have to download

40
00:02:04,060 --> 00:02:07,010
some things, here, to make this whole package manager work.

41
00:02:08,150 --> 00:02:10,550
And, now, the installation is finally done.

42
00:02:10,550 --> 00:02:12,510
As I said, this can take a few minutes

43
00:02:12,510 --> 00:02:15,520
so don't wonder if you have to wait a bit,

44
00:02:15,520 --> 00:02:17,860
but the cool thing, now, is that with Homebrew

45
00:02:17,860 --> 00:02:21,150
we can now easily install Git.

46
00:02:21,150 --> 00:02:23,100
Let's go back to the Git page,

47
00:02:23,100 --> 00:02:24,643
and let's close this maybe,

48
00:02:25,810 --> 00:02:28,360
and, here, we see the only thing you have to run now

49
00:02:28,360 --> 00:02:30,730
is brew install git.

50
00:02:30,730 --> 00:02:34,480
Guess we can do this, so brew install git.

51
00:02:34,480 --> 00:02:36,650
So we're using this package manager, now,

52
00:02:36,650 --> 00:02:40,570
to install the latest Git version, so let's do this.

53
00:02:40,570 --> 00:02:43,440
This shouldn't take that long, let's see.

54
00:02:43,440 --> 00:02:45,910
With this, the installation is finished

55
00:02:45,910 --> 00:02:49,000
and what we should do now is we should check

56
00:02:49,000 --> 00:02:52,170
whether the installation was successful.

57
00:02:52,170 --> 00:02:56,080
To do this, we can write our first Git command already.

58
00:02:56,080 --> 00:03:00,830
Git commands always start with git, the Git keyword

59
00:03:00,830 --> 00:03:03,690
to, well, tell the computer that we want to interact

60
00:03:03,690 --> 00:03:08,030
with Git, in here, that we want to execute Git commands,

61
00:03:08,030 --> 00:03:11,430
then a space, and then the command that you want to run.

62
00:03:11,430 --> 00:03:15,040
Here, we want to check the installed Git version,

63
00:03:15,040 --> 00:03:18,200
and this can be done by adding two dashes

64
00:03:18,200 --> 00:03:20,903
and then the version keyword here.

65
00:03:22,290 --> 00:03:24,360
With this, by hitting enter,

66
00:03:24,360 --> 00:03:26,930
we should see that the latest Git version

67
00:03:26,930 --> 00:03:29,930
that we installed is 2.32,

68
00:03:29,930 --> 00:03:33,260
so the one that we saw on the website.

69
00:03:33,260 --> 00:03:37,190
In case the installation doesn't show this latest version,

70
00:03:37,190 --> 00:03:41,010
right here, then you can simply close the terminal window,

71
00:03:41,010 --> 00:03:44,650
up here in Terminal and then Quit Terminal,

72
00:03:44,650 --> 00:03:47,140
and then you can start a new terminal.

73
00:03:47,140 --> 00:03:50,280
Because sometimes Homebrew also installs

74
00:03:50,280 --> 00:03:53,500
older versions of Git, well, when installing Homebrew,

75
00:03:53,500 --> 00:03:56,170
and, because of that, the updated version

76
00:03:56,170 --> 00:03:58,330
might not be displayed correctly, here,

77
00:03:58,330 --> 00:03:59,930
in this terminal window.

78
00:03:59,930 --> 00:04:02,600
But, as I said, starting a new terminal

79
00:04:02,600 --> 00:04:07,000
and then running git --version should do the trick here.

80
00:04:07,000 --> 00:04:11,290
With this, we installed Git on our MacOS computer.

81
00:04:11,290 --> 00:04:13,460
If you also want to find out how this works

82
00:04:13,460 --> 00:04:15,790
on Windows machines, feel free to dive

83
00:04:15,790 --> 00:04:17,360
into the next lecture,

84
00:04:17,360 --> 00:04:19,769
otherwise you can skip the next lecture

85
00:04:19,769 --> 00:04:22,483
and continue with the lecture afterwards.

