1
00:00:00,068 --> 00:00:04,070
[MUSIC]

2
00:00:04,070 --> 00:00:08,750
Git is a very popular version
control system for software.

3
00:00:08,750 --> 00:00:13,750
We need Git for working with our node
ecosystem that we're going to use

4
00:00:13,750 --> 00:00:16,390
throughout this specialization.

5
00:00:16,390 --> 00:00:20,380
So, it is important for
you to get Git onto your computer.

6
00:00:20,380 --> 00:00:26,820
So, let's go through a few quick steps
to setup Git on your computer and

7
00:00:26,820 --> 00:00:33,850
then some quick commands to enable us to
make use of Git in this specialization.

8
00:00:35,680 --> 00:00:40,324
I will no go into too much of details
about version control and how Git works,

9
00:00:40,324 --> 00:00:40,987
and so on.

10
00:00:40,987 --> 00:00:43,328
That is beyond the scope of this course.

11
00:00:43,328 --> 00:00:48,680
Instead, we'll just get some
basic understanding of Git.

12
00:00:48,680 --> 00:00:51,299
Git is as I said,
a version control system.

13
00:00:51,299 --> 00:00:54,035
This is a software tool
that enables us for

14
00:00:54,035 --> 00:00:59,360
the management of changes to source code
and maintaining your version history.

15
00:00:59,360 --> 00:01:01,824
So as your source code evolves,

16
00:01:01,824 --> 00:01:06,936
you will be able to check-in the code
at different points in time,

17
00:01:06,936 --> 00:01:11,500
so that you can always have a way
of rolling back to a previous

18
00:01:11,500 --> 00:01:17,510
version in case your updates to
the code doesn't work correctly.

19
00:01:17,510 --> 00:01:23,937
There are various version control systems
that are in use in the real world,

20
00:01:23,937 --> 00:01:29,058
including CVS, SVN,
Git being a very popular mechanism for

21
00:01:29,058 --> 00:01:31,580
version control these days.

22
00:01:31,580 --> 00:01:33,653
Where did Git originate?

23
00:01:33,653 --> 00:01:40,647
Git was designed by Linus Torvalds, the
person behind the Linux operating system.

24
00:01:40,647 --> 00:01:44,590
Git was designed as
a version control system,

25
00:01:44,590 --> 00:01:51,161
a distributed version control system for
use in Linux kernel development and

26
00:01:51,161 --> 00:01:55,520
it has seen much wider
deployment in the real word.

27
00:01:56,970 --> 00:02:00,830
No ecosystem is very
much tied into Git and

28
00:02:00,830 --> 00:02:04,780
that is the reason why we need get for
this specialization.

29
00:02:06,600 --> 00:02:13,220
Let's now move on to a few hands on
exercises where you will first setup Git,

30
00:02:13,220 --> 00:02:18,700
then you will learn a few basic Git
commands and then also understand

31
00:02:18,700 --> 00:02:25,610
how you can setup an online repository
in places like GitHub or BitBucket for

32
00:02:25,610 --> 00:02:32,190
synchronizing your source code from
your computer to the online repository.

33
00:02:32,190 --> 00:02:37,160
This is obviously not a comprehensive
tutorial of Git, but we'll learn just

34
00:02:37,160 --> 00:02:42,439
enough of the commands that are necessary
for use in this specialization.

35
00:02:43,710 --> 00:02:49,240
Let's now run through a few quick
steps to setup Git on your computer.

36
00:02:49,240 --> 00:02:54,328
One easy way of setting up Git on
your computer is to go to this site

37
00:02:54,328 --> 00:03:00,757
called git-scm.com and then download
the Git installation files from there.

38
00:03:00,757 --> 00:03:04,797
So when you visit this website,
git-scm.com,

39
00:03:04,797 --> 00:03:11,157
you will see on the right-hand side here,
a button for you to download to Git.

40
00:03:11,157 --> 00:03:16,471
If you want to, you can go directly to
the downloads page here on this site and

41
00:03:16,471 --> 00:03:20,542
then you'll find the downloads for
various platforms and

42
00:03:20,542 --> 00:03:25,550
you can download the one for
your specific platform for installation.

43
00:03:25,550 --> 00:03:29,300
This is the easiest way of
getting Git onto your computer.

44
00:03:29,300 --> 00:03:33,489
There are other ways of setting up Git,
depending on your platform.

45
00:03:33,489 --> 00:03:37,982
For example, if you install
GitHub Desktop on your computer,

46
00:03:37,982 --> 00:03:41,450
it'll automatically setup Git for you.

47
00:03:41,450 --> 00:03:44,174
If you are using a Mac and
you set up Xcode and

48
00:03:44,174 --> 00:03:49,047
especially the Xcode command line tools,
that will also setup Git for you.

49
00:03:49,047 --> 00:03:55,326
On this site, git-scm.com,
if you go to the documentation page,

50
00:03:55,326 --> 00:04:00,430
you will notice that there is
a book here called Pro Git.

51
00:04:00,430 --> 00:04:04,360
You can just go onto
the Getting Started link.

52
00:04:04,360 --> 00:04:10,549
You will see a specific chapter
here on Installing Git.

53
00:04:10,549 --> 00:04:14,385
So juts go to this Installing Git site and
there,

54
00:04:14,385 --> 00:04:20,198
you have more details about how to
install Git on your specific platform.

55
00:04:20,198 --> 00:04:23,776
So, you can use any of
the methods suggested here for

56
00:04:23,776 --> 00:04:26,147
installing Git on your platform.

57
00:04:26,147 --> 00:04:28,210
This is fairly straightforward, so

58
00:04:28,210 --> 00:04:31,680
I'm not going to go through
the details of how to do the setup.

59
00:04:31,680 --> 00:04:38,358
Download the installer and run through
the setup to get Git onto your computer.

60
00:04:38,358 --> 00:04:43,105
Once you install Git on your computer,
startup a command window or

61
00:04:43,105 --> 00:04:46,582
PowerShell if you're using
a Windows machine or

62
00:04:46,582 --> 00:04:51,357
startup a terminal window if you're
using a Mac or Linux machine.

63
00:04:51,357 --> 00:04:56,494
And then at the prompt,
Type in git --version to check

64
00:04:56,494 --> 00:05:01,209
what version of Git is
installed on your computer.

65
00:05:01,209 --> 00:05:06,438
So on my machine, I have this
current version of Git installed and

66
00:05:06,438 --> 00:05:09,587
that is good enough for me to work with.

67
00:05:09,587 --> 00:05:15,155
Once we verify that the Git is installed,
we will configure a couple

68
00:05:15,155 --> 00:05:20,441
of global identity parameters
the user name and email address.

69
00:05:20,441 --> 00:05:24,334
So that whenever Git does any
comments as you will learn later,

70
00:05:24,334 --> 00:05:26,690
it will make use of this information.

71
00:05:26,690 --> 00:05:31,306
So to do, that I've deployed type git

72
00:05:31,306 --> 00:05:35,493
config --global user.name and

73
00:05:35,493 --> 00:05:39,832
then you can type in your user name.

74
00:05:44,818 --> 00:05:51,429
There are other parameters that I'm
going to configure is by email.

75
00:06:00,537 --> 00:06:05,664
And to ensure that that this
information has been configured,

76
00:06:05,664 --> 00:06:08,468
we can type git config --list and

77
00:06:08,468 --> 00:06:13,803
then it'll list out a bunch of
configurations that we have done.

78
00:06:13,803 --> 00:06:16,257
Some of these are automatically setup for
you.

79
00:06:16,257 --> 00:06:19,839
But if you want to,
you can set them up as you require.

80
00:06:19,839 --> 00:06:25,278
So here, I have my code
editor value set to vi which

81
00:06:25,278 --> 00:06:30,860
is what I used to do a command
line editing of files.

82
00:06:32,390 --> 00:06:39,607
So with this, we have completed
the setup Git for use on your computer.

83
00:06:39,607 --> 00:06:45,089
Once you got Git on your computer,
it is time to go and learn Git bit by bit.

84
00:06:45,089 --> 00:06:48,369
[MUSIC]