1
00:00:00,000 --> 00:00:04,137
[MUSIC]

2
00:00:04,137 --> 00:00:09,100
Git is a very popular version
control system for software.

3
00:00:09,100 --> 00:00:14,650
We need Git for working with our node
ecosystem that we're going to use

4
00:00:14,650 --> 00:00:16,460
throughout this specialization.

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

6
00:00:20,320 --> 00:00:26,550
So let's go through a few quick steps
to set up Git on your computer.

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

8
00:00:35,620 --> 00:00:40,120
I will not go into too much of details
about version control and how Git works,

9
00:00:40,120 --> 00:00:41,140
and so on.

10
00:00:41,140 --> 00:00:43,530
That is beyond the scope of this course.

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

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

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

14
00:00:54,330 --> 00:00:59,510
the management of changes to source
code and maintaining a version history.

15
00:00:59,510 --> 00:01:01,805
So as your source code evolves,

16
00:01:01,805 --> 00:01:06,400
you will be able to check in the code
on different points of time.

17
00:01:06,400 --> 00:01:11,590
So that you can always have
a way of rolling back to

18
00:01:11,590 --> 00:01:17,450
a previous version in case your updates
to the code doesn't work correctly.

19
00:01:17,450 --> 00:01:22,530
There are various version control systems
that are in use in the real world.

20
00:01:22,530 --> 00:01:27,863
Including CVS, SVN, and
Git being a very popular mechanism for

21
00:01:27,863 --> 00:01:30,350
version control these days.

22
00:01:31,730 --> 00:01:33,800
Where did Git originate?

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

24
00:01:40,760 --> 00:01:45,860
Git was designed as a distributed
version control system for

25
00:01:45,860 --> 00:01:49,990
use in Linux kernel development.

26
00:01:49,990 --> 00:01:56,540
And it has seen much wider deployment
in the real world these days.

27
00:01:56,540 --> 00:02:00,600
That node ecosystem is
very much tied into Git.

28
00:02:00,600 --> 00:02:04,720
And that is the reason why we need Git for
this specialization.

29
00:02:06,540 --> 00:02:13,160
Let's now move on to a few hands-on
exercises where you will first set up Git.

30
00:02:13,160 --> 00:02:16,270
Then you will learn a few
basic Git commands.

31
00:02:16,270 --> 00:02:21,230
And then also understand how you
can set up an online repository

32
00:02:21,230 --> 00:02:25,550
in places like GitHub or Bitbucket for

33
00:02:25,550 --> 00:02:32,130
synchronizing your source code from
your computer to the online repository.

34
00:02:32,130 --> 00:02:37,090
This is obviously not a comprehensive
tutorial of Git, but we'll learn just

35
00:02:37,090 --> 00:02:43,650
enough of the commands that are necessary
for use in this specialization.

36
00:02:43,650 --> 00:02:47,860
Let's now run through a few quick
steps to set up Git on your computer.

37
00:02:49,340 --> 00:02:54,760
One easy way of setting up Git on your
computer is to go to this site called

38
00:02:54,760 --> 00:03:00,960
git- scm.com, and then download
the Git installation files from there.

39
00:03:00,960 --> 00:03:04,783
So when you visit this website,
git.scm.com,

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

41
00:03:11,390 --> 00:03:17,260
If you want to, you can go directly to
the downloads page here on the site.

42
00:03:17,260 --> 00:03:21,050
And then you will find the downloads for
various platforms, and

43
00:03:21,050 --> 00:03:25,700
you can download the one for
your specific platform for installation.

44
00:03:25,700 --> 00:03:29,240
This is the easiest way of
getting Git onto your computer.

45
00:03:29,240 --> 00:03:33,590
There are other ways of setting up
Git depending on your platform.

46
00:03:33,590 --> 00:03:39,160
For example, if you install
GitHub Desktop on your computer,

47
00:03:39,160 --> 00:03:41,390
it'll automatically set up Git for you.

48
00:03:41,390 --> 00:03:44,660
If you are using a Mac and
you set up X Cord, and

49
00:03:44,660 --> 00:03:47,180
especially the X Cord command line tools.

50
00:03:47,180 --> 00:03:49,270
That will also setup Git for you.

51
00:03:49,270 --> 00:03:54,410
On this site, git-scm.com,
if you go to the documentation page,

52
00:03:54,410 --> 00:04:00,600
you will notice that there is
a book here called, Pro Git.

53
00:04:00,600 --> 00:04:04,520
You can just go on to
the Getting Started link.

54
00:04:04,520 --> 00:04:10,660
You will see a specific chapter
here on installing Git.

55
00:04:10,660 --> 00:04:15,560
So, just go to this Installing Git site,
and there you have more details

56
00:04:15,560 --> 00:04:20,380
about how to install Git
on your specific platform.

57
00:04:20,380 --> 00:04:24,100
So, you can use any of
the methods suggested here for

58
00:04:24,100 --> 00:04:26,340
installing Git on your platform.

59
00:04:26,340 --> 00:04:28,060
This is fairly straightforward, so

60
00:04:28,060 --> 00:04:31,790
I am not going to go through
the details of how to do the setup.

61
00:04:31,790 --> 00:04:37,340
Download the installer and run through
the setup to get Git onto your computer.

62
00:04:38,520 --> 00:04:42,240
Once you install Git on your computer,
start up a command window or

63
00:04:42,240 --> 00:04:44,880
PowerShell if you're
using a Windows machine.

64
00:04:44,880 --> 00:04:51,550
Or start up a terminal window if
you're using a Mac or Linux machine.

65
00:04:51,550 --> 00:04:57,530
And then at the prompt,
type in git --version

66
00:04:57,530 --> 00:05:01,310
to check what version of Git
is installed on your computer.

67
00:05:01,310 --> 00:05:06,320
So on my machine I have this current
version of Git installed, and

68
00:05:06,320 --> 00:05:09,790
that is good enough for me to work with.

69
00:05:09,790 --> 00:05:14,120
Once we verify that Git is installed,
you will configure a couple of global

70
00:05:15,680 --> 00:05:20,550
identity parameters,
the username and email address.

71
00:05:20,550 --> 00:05:25,120
So that whenever Git does any
comments as you will learn later,

72
00:05:25,120 --> 00:05:26,840
it will make use of this information.

73
00:05:26,840 --> 00:05:35,219
So, to do that, at the prompt type
git config --global user.name,

74
00:05:35,219 --> 00:05:39,977
and there you can type in your username.

75
00:05:44,988 --> 00:05:48,646
The other parameter that I'm
going to configure is my email.

76
00:06:00,726 --> 00:06:05,407
And to ensure that this
information has been configured,

77
00:06:05,407 --> 00:06:08,367
we can type git config --list, and

78
00:06:08,367 --> 00:06:13,950
then it'll list out a bunch of
configurations that we have done.

79
00:06:13,950 --> 00:06:17,380
Some of these are automatically set up for
you, but if you want to,

80
00:06:17,380 --> 00:06:19,950
you can set them up as you require.

81
00:06:19,950 --> 00:06:24,790
So here I have my code
editor value set to VI,

82
00:06:24,790 --> 00:06:30,620
which is what I use to do
a command line editing of files.

83
00:06:32,310 --> 00:06:38,770
So with this, we have completed the setup
of Git for use on our computers.

84
00:06:39,820 --> 00:06:45,134
Once you get Git on your computer,
it is time to go and learn Git bit by bit.

85
00:06:45,134 --> 00:06:48,321
[MUSIC]