1
00:00:01,970 --> 00:00:04,400
What did we learn in this module?

2
00:00:04,400 --> 00:00:07,240
Well, we learned about Git first

3
00:00:07,240 --> 00:00:11,240
and we learned that Git is all about version management.

4
00:00:11,240 --> 00:00:15,130
It is a tool to keep track of code changes

5
00:00:15,130 --> 00:00:19,240
in a very efficient and actually also easy to use way

6
00:00:19,240 --> 00:00:21,670
once the basics are set.

7
00:00:21,670 --> 00:00:24,880
These basics involved some core commands,

8
00:00:24,880 --> 00:00:27,360
which you don't have to remember by heart,

9
00:00:27,360 --> 00:00:28,800
but the more you use Git,

10
00:00:28,800 --> 00:00:31,453
the more common these commands will become to you.

11
00:00:32,530 --> 00:00:33,580
With Git init,

12
00:00:33,580 --> 00:00:38,270
we were able to initialize a so-called Git repository.

13
00:00:38,270 --> 00:00:42,390
So we turned our project folder into a working directory,

14
00:00:42,390 --> 00:00:45,520
and the Git repository holds all the logic

15
00:00:45,520 --> 00:00:48,283
to keep track of our file changes.

16
00:00:49,260 --> 00:00:51,530
We also learned about Git add.

17
00:00:51,530 --> 00:00:54,370
Git add helped us to bring our changes

18
00:00:54,370 --> 00:00:58,890
and our files and folders to the so-called staging area,

19
00:00:58,890 --> 00:01:01,970
which makes Git aware of the files

20
00:01:01,970 --> 00:01:03,510
that we want to implement,

21
00:01:03,510 --> 00:01:06,250
or the changes made to these files

22
00:01:06,250 --> 00:01:10,030
that we want to implement in our next commit.

23
00:01:10,030 --> 00:01:13,910
A commit is a snapshot of the code,

24
00:01:13,910 --> 00:01:16,620
a current snapshot of the code you want to take,

25
00:01:16,620 --> 00:01:20,110
and also a snapshot we can jump back to historically

26
00:01:20,110 --> 00:01:21,023
if we want to.

27
00:01:21,990 --> 00:01:25,470
With Git commit dash M and then a commit message

28
00:01:25,470 --> 00:01:29,480
in parenthesis, we were able to also give these snapshots

29
00:01:29,480 --> 00:01:31,860
a name to quickly identify these

30
00:01:31,860 --> 00:01:34,750
throughout our code history.

31
00:01:34,750 --> 00:01:38,350
Besides commits, we also have branches.

32
00:01:38,350 --> 00:01:43,350
A branch is kind of a folder holding all our commits,

33
00:01:43,420 --> 00:01:47,300
all our snapshots, and by working in different branches,

34
00:01:47,300 --> 00:01:50,250
we can make sure that our core project

35
00:01:50,250 --> 00:01:53,450
remains in the main or master branch

36
00:01:53,450 --> 00:01:57,120
and any deviations from that, any additional features

37
00:01:57,120 --> 00:02:01,490
you might want to work on are part of a feature branch

38
00:02:01,490 --> 00:02:04,930
or a branch having any other name of your choice,

39
00:02:04,930 --> 00:02:07,890
which allows you to work on specific features,

40
00:02:07,890 --> 00:02:09,750
and once once this feature is finished,

41
00:02:09,750 --> 00:02:13,430
you can merge it back into the main branch.

42
00:02:13,430 --> 00:02:16,210
With Git checkout dash B,

43
00:02:16,210 --> 00:02:19,690
we were able to create such other branches

44
00:02:19,690 --> 00:02:22,723
based on the branch we are currently working in.

45
00:02:23,710 --> 00:02:26,420
Besides Git, our version management tool,

46
00:02:26,420 --> 00:02:31,030
we also have GitHub, which is all about repository hosting.

47
00:02:31,030 --> 00:02:34,453
So it helped us to bring our local projects to the cloud.

48
00:02:35,890 --> 00:02:40,830
Git remote add origin, allowed us to establish a connection

49
00:02:40,830 --> 00:02:42,833
between Git and GitHub.

50
00:02:44,100 --> 00:02:46,830
This was very helpful to, well then,

51
00:02:46,830 --> 00:02:51,830
push our local project from Git to GitHub.

52
00:02:51,840 --> 00:02:53,960
Besides pushing, we also learned

53
00:02:53,960 --> 00:02:57,880
that if changes are added remotely on GitHub,

54
00:02:57,880 --> 00:03:01,020
for example in a project where other people

55
00:03:01,020 --> 00:03:03,760
collaborate together with us,

56
00:03:03,760 --> 00:03:07,110
and when these changes are only available on GitHub,

57
00:03:07,110 --> 00:03:11,230
we also want to have this updated code locally on Git.

58
00:03:11,230 --> 00:03:14,093
Well, this is possible with Git pull.

59
00:03:15,030 --> 00:03:19,410
Besides Git push and Git pull, we also had Git clone.

60
00:03:19,410 --> 00:03:21,440
Git clone is the command to use

61
00:03:21,440 --> 00:03:26,440
if an existing remote repository contains code already,

62
00:03:26,690 --> 00:03:29,670
and if we want to access this code locally

63
00:03:29,670 --> 00:03:31,710
via Git on our machine,

64
00:03:31,710 --> 00:03:35,190
and we also learned that to make this whole process,

65
00:03:35,190 --> 00:03:37,220
this exchange of information

66
00:03:37,220 --> 00:03:39,520
between Git and GitHub possible,

67
00:03:39,520 --> 00:03:41,500
we need to understand the concept

68
00:03:41,500 --> 00:03:44,720
of the personal access token.

69
00:03:44,720 --> 00:03:47,880
This token grants the local Git user

70
00:03:47,880 --> 00:03:50,320
access to a GitHub account

71
00:03:50,320 --> 00:03:52,650
and the corresponding repositories

72
00:03:52,650 --> 00:03:54,780
which are part of this account,

73
00:03:54,780 --> 00:03:57,640
and to make this whole thing work perfectly,

74
00:03:57,640 --> 00:04:00,210
we learned that using GitHub all alone

75
00:04:00,210 --> 00:04:02,490
is not the final solution.

76
00:04:02,490 --> 00:04:05,970
We saw that by adding collaborators for example

77
00:04:05,970 --> 00:04:09,400
in combination with the personal access token,

78
00:04:09,400 --> 00:04:13,260
this allows us to efficiently collaborate on projects

79
00:04:13,260 --> 00:04:15,163
via Git and GitHub.

80
00:04:16,170 --> 00:04:20,450
And whilst this was a first overview of these two tools,

81
00:04:20,450 --> 00:04:24,400
I highly recommend you to dive deeper into this topics

82
00:04:24,400 --> 00:04:27,570
on your journey to become a web developer.

83
00:04:27,570 --> 00:04:30,340
To dive deeper here, you can of course check out

84
00:04:30,340 --> 00:04:35,340
the official webpages, git-scm.com or github.com

85
00:04:35,480 --> 00:04:37,420
to learn more about these tools,

86
00:04:37,420 --> 00:04:39,800
also in the official docs.

87
00:04:39,800 --> 00:04:43,750
Or you can also explore our Git and GitHub,

88
00:04:43,750 --> 00:04:45,590
the practical guide course,

89
00:04:45,590 --> 00:04:48,760
which is, well, a very thorough introduction

90
00:04:48,760 --> 00:04:52,730
into these tools and which also goes a lot deeper

91
00:04:52,730 --> 00:04:55,090
than this introduction we had here

92
00:04:55,090 --> 00:04:58,060
throughout this web development course.

93
00:04:58,060 --> 00:05:00,550
Nevertheless, I hope you now understand

94
00:05:00,550 --> 00:05:02,310
how version management works

95
00:05:02,310 --> 00:05:05,310
and therefore it's time to leave the space

96
00:05:05,310 --> 00:05:09,493
and to continue with our web development course now.

