1
00:00:00,490 --> 00:00:06,200
Welcome back to the course, and we are now on lesson six, crash course on Gett and GitHub.

2
00:00:06,940 --> 00:00:13,090
Now, these are very, very important get as a free and open source distributed version control system

3
00:00:13,630 --> 00:00:18,410
designed to handle everything from small to very large projects with a lot of speed and efficiency.

4
00:00:18,970 --> 00:00:23,500
There have been other version control systems in the past, just so you understand what version control

5
00:00:23,500 --> 00:00:23,860
is.

6
00:00:24,250 --> 00:00:31,600
It's basically a process where you can keep track of all of the changes that occur in the files and

7
00:00:31,600 --> 00:00:39,920
folders in your project without having to store a full copy of every single change.

8
00:00:39,950 --> 00:00:42,730
So a full copy of the files and folders.

9
00:00:43,210 --> 00:00:48,290
Whenever a change is made, it also helps you keep track of when those changes were made.

10
00:00:48,310 --> 00:00:58,060
So it's easy to go back to a version of your software before maybe a certain bug was created or something

11
00:00:58,060 --> 00:00:58,900
else happened.

12
00:00:58,930 --> 00:01:03,350
Also, it's easy to see which changes different people make.

13
00:01:03,370 --> 00:01:09,430
So if you're working on a project with multiple people, it can make it very clear who did which change.

14
00:01:09,610 --> 00:01:13,090
And as a result, you can manage your project more efficiently.

15
00:01:13,840 --> 00:01:15,870
So that is what it is.

16
00:01:15,910 --> 00:01:23,350
That's the open source system and it's this set of functions and basically a library of commands that

17
00:01:23,350 --> 00:01:24,040
you can use.

18
00:01:24,400 --> 00:01:26,410
And then there's also GitHub.

19
00:01:26,650 --> 00:01:29,710
Now, GitHub is just one of many hosts.

20
00:01:29,710 --> 00:01:36,760
So it's a it's an actual company, a private company that hosts these projects online to make it much

21
00:01:36,760 --> 00:01:40,330
easier for you to collaborate with these projects with other people.

22
00:01:40,930 --> 00:01:41,890
GitHub is the biggest one.

23
00:01:41,900 --> 00:01:49,000
There's also BitBucket and Get Lab and a number of other hosts that will allow you to store your get

24
00:01:49,000 --> 00:01:53,410
repositories online and then collaborate with other people on those.

25
00:01:53,980 --> 00:01:57,970
So let's take a deeper look at how we can get started with it.

26
00:01:58,360 --> 00:02:00,990
So first of all, we're going to do is actually go to get Hub.

27
00:02:01,810 --> 00:02:03,520
So here is GitHub dot com.

28
00:02:03,730 --> 00:02:06,400
If you create an account, it's pretty easy to do so.

29
00:02:06,400 --> 00:02:09,900
Just put in a user name, email and password and then you can sign up.

30
00:02:10,420 --> 00:02:13,450
I'm going to sign in because I have an account I'm going to sign in here.

31
00:02:15,350 --> 00:02:22,670
And then it's fairly easy to create a new repository, a repository is basically a folder with get enabled

32
00:02:23,390 --> 00:02:26,470
so that you can manage a project.

33
00:02:26,540 --> 00:02:28,450
So here you just choose a name for it.

34
00:02:29,600 --> 00:02:31,400
And I'm just going to give it a description.

35
00:02:37,350 --> 00:02:43,790
And I'm going to keep this one public, I'm going to add a read me file and I will choose a license.

36
00:02:44,940 --> 00:02:50,640
These are optional steps you can skip, but it's very good to have a read me file to describe what your

37
00:02:50,640 --> 00:02:52,500
project is and what it's for.

38
00:02:53,070 --> 00:02:58,260
I'm going to have read my files in multiple folders, in our court documents and GitHub so that you

39
00:02:58,260 --> 00:03:00,780
can see resources for each lesson.

40
00:03:02,290 --> 00:03:03,760
And then we create the repository.

41
00:03:08,400 --> 00:03:15,330
So we have one main branch called Main, and then we have basically all the code that's in here at Initializes

42
00:03:15,330 --> 00:03:21,930
with this README file, it's in marked down markdown is basically a just a rich text document, just

43
00:03:21,930 --> 00:03:31,920
like a text file that uses markdown similar to HTML in order to connect this and then start editing

44
00:03:31,920 --> 00:03:39,860
this and then make it easy for us to edit any files in this project and then upload them back to GitHub.

45
00:03:39,900 --> 00:03:41,310
We're just going to copy this link.

46
00:03:42,480 --> 00:03:49,310
So we just click here on code to copy this link right here and then we're going to go over to our folder.

47
00:03:50,280 --> 00:03:54,540
So I've created a folder here on my computer and I'm just going to clone.

48
00:03:57,750 --> 00:04:03,840
Now, I'm going to get Klown this right here, OK?

49
00:04:07,410 --> 00:04:13,620
And so it cloned that repo, basically, cloning means it's going to download it, it's making a copy,

50
00:04:13,620 --> 00:04:16,290
a clone of that folder onto my computer.

51
00:04:17,780 --> 00:04:23,960
And so now I've got that on my computer, it's here, I can check and notice that all I have inside

52
00:04:23,960 --> 00:04:31,490
this folder is another one I can get into so I can change directory into that one and then see what's

53
00:04:31,490 --> 00:04:31,870
in there.

54
00:04:36,220 --> 00:04:40,630
And not much, just the license and the read me the ones that I created in GitHub.

55
00:04:41,750 --> 00:04:45,490
OK, so now I can do whatever else I want.

56
00:04:45,490 --> 00:04:51,570
I can create new files in here and see I can save them.

57
00:04:51,670 --> 00:04:57,310
Let's just let's do a quick console log.

58
00:05:05,530 --> 00:05:08,360
And then save this as a test.

59
00:05:08,620 --> 00:05:09,250
James.

60
00:05:19,310 --> 00:05:19,790
OK.

61
00:05:21,140 --> 00:05:24,320
And then save that file and now if we lose again.

62
00:05:27,920 --> 00:05:29,540
Now, we have that file right here.

63
00:05:31,540 --> 00:05:34,780
So let's check our get status, OK?

64
00:05:35,740 --> 00:05:41,860
And our guest status command just tells us that, you know, which changes have been made to the repo

65
00:05:41,860 --> 00:05:48,580
locally so that we can compare that with what was already in the project, which is synchronized with

66
00:05:48,580 --> 00:05:49,550
GitHub, dotcom.

67
00:05:50,710 --> 00:05:51,160
So.

68
00:05:52,380 --> 00:05:55,470
This branch is up to date, but there's an entourage file.

69
00:05:56,570 --> 00:05:58,100
Tests that dogs.

70
00:05:58,510 --> 00:06:04,910
So nothing's been added to the comet, so it's not going to synchronise anything online just yet, we

71
00:06:04,910 --> 00:06:07,610
need to do a few more commands to make that happen.

72
00:06:09,170 --> 00:06:20,230
We could also build this file on a branch so we can get checkout dashboard and we can name a branch.

73
00:06:20,240 --> 00:06:23,600
I'll just name it with my name piece Elsworth.

74
00:06:23,900 --> 00:06:25,520
OK, so now we're on a new branch.

75
00:06:26,410 --> 00:06:28,930
And I can create files on that branch.

76
00:06:30,250 --> 00:06:33,370
So I could touch a file and just do.

77
00:06:35,110 --> 00:06:36,940
Test to that G.S..

78
00:06:39,430 --> 00:06:43,400
Go into my test to console that log.

79
00:06:45,100 --> 00:06:51,850
Hey, I'm writing JavaScript.

80
00:06:55,560 --> 00:06:58,470
OK, so we can save that.

81
00:07:00,080 --> 00:07:03,430
We can save that, let's check on our get status.

82
00:07:04,730 --> 00:07:06,650
All right, so let's go ahead and.

83
00:07:08,330 --> 00:07:10,730
Get add that.

84
00:07:14,730 --> 00:07:18,570
What that did is it added those final changes to my rebo.

85
00:07:20,170 --> 00:07:24,880
And now I'm going to get Comet Dash M.

86
00:07:27,010 --> 00:07:36,010
Adding the first commit to the rebuild, so you just put some message there that's descriptive, that

87
00:07:36,010 --> 00:07:41,630
will clarify what code was changed in that first edit.

88
00:07:43,060 --> 00:07:44,230
OK, now I'm going to.

89
00:07:50,140 --> 00:07:53,380
Commit origin on my branch.

90
00:07:56,700 --> 00:08:02,340
And it's going to push those up to GitHub, so let's go take a look at those.

91
00:08:05,790 --> 00:08:11,790
OK, so it immediately showed up in GitHub piece Elsworth, his recent pushes less than a minute ago.

92
00:08:12,480 --> 00:08:14,550
Let's do a compare and pull request.

93
00:08:21,340 --> 00:08:23,080
And let's take a look at these changes.

94
00:08:28,490 --> 00:08:30,050
So of created the pull request.

95
00:08:32,020 --> 00:08:38,710
And we've added to files, test James and test you is great.

96
00:08:40,610 --> 00:08:44,120
All right, so then let's close that poor request.

97
00:08:46,730 --> 00:08:52,430
By merging it, if you had a reviewer and if someone else was reviewing your code, then you wouldn't

98
00:08:52,430 --> 00:08:54,890
be the one to merge the request.

99
00:08:54,890 --> 00:09:03,140
You would add them as a reviewer by adding them as a collaborator on the project in GitHub.

100
00:09:03,140 --> 00:09:05,990
And then you would ask them to do this merge.

101
00:09:07,640 --> 00:09:13,700
If it's confirmed the merge request successfully merged and closed.

102
00:09:13,940 --> 00:09:21,740
OK, so once that's done, you can safely delete the branch or you can keep it open and keep using that

103
00:09:21,740 --> 00:09:22,550
branch in the future.

104
00:09:28,470 --> 00:09:29,220
And there you go.

105
00:09:31,870 --> 00:09:37,510
So now here is the history of poor requests and we can see.

106
00:09:40,200 --> 00:09:48,240
Each individual change made in that poll request, that is a crash course on Git and GitHub in the next

107
00:09:48,240 --> 00:09:53,640
lesson, we're going to talk about some online resources that you're going to want to use just to answer

108
00:09:53,970 --> 00:09:56,740
basically any question that you have about JavaScript.

109
00:09:57,270 --> 00:10:03,510
So in that, we're going to look at three schools at the Mozilla Developer Network and its stack overflow.

110
00:10:03,990 --> 00:10:04,380
All right.

111
00:10:04,570 --> 00:10:05,340
We'll talk to you soon.
