0:09
We need Git for working with our node ecosystem that we're going to use
throughout this specialization.
So it is important for you to get Git onto your computer.
So let's go to a few quick steps to set up Git on your computer,
and then some quick commands to enable us to make use of Git in this specialization.
0:35
I will not go into too much of details about version control and
how Git works and so on.
That is beyond the scope of this course.
Instead, we'll just get some basic understanding of Git.
Git is, as I said, a version control system.
This is a software tool that enables us for
the management of changes to source code, and maintaining the version history.
So as your source code evolves, you'll be able to check in the code
at different points of time, so that you can always have a way of rolling back
to a previous version in case your updates to the code doesn't work correctly.
Then our various version control systems that are in used in the real world,
including CVS, SVN, and
Git being a very popular mechanism for version control these days.
1:31
Where did Git originate?
Git was designed by Linus Torvalds, the person behind the Linux operation system.
GIT was designed as a version control system,
a distributed version control system for use in Linux kernel development.
And it has seen much wider deployment in the real world these days.
The Node ecosystem is very much tied into Git, and
that is the reason why we need Git for this specialization.
2:06
Let's now move on to a few hands-on exercises where you will
first set up Git., then you will learn a few basic Git commands.
And then also understand how you can set up an online repository
in places like GitHub or Bitbucket for
synchronizing your source code from your computer to the online repository.
This is obviously not a comprehensive tutorial on Git, but we'll learn just
enough of the commands that are necessary for use in this specialization.
2:49
One easy way of setting up Git on a computer is to go to this site called,
git-scm.com, and then download the Git installation files from there.
So when you visit this website, git-scm.com,
you will see on the right-hand side here a button for you to download the GIt.
If you want to, you can go directly to the Downloads page here on the site.
And then you will find the downloads for various platforms, and
you can download the one for your specific platform for installation.
This is the easiest way of getting git onto your computer.
There are other ways of setting up Git depending on your platform.
For example, if you install GitHub Desktop on your computer,
it'll automatically set up Git for you.
If you are using a Mac and you setup Xcode, and
especially the Xcode command line tools, that will also setup Git for you.
On this site, git-scm.com, if you go to the Documentation page,
you will notice that there is a book here called Pro Git.
You can just go onto the Getting Started link.
You will see a specific chapter here on installing Git,
so just go into this installing Git site.
And there, you have more details about how to install Git on your specific platform.
So you can use any of the methods suggested here for
installing Git on your platform.
This is fairly straightforward, so
I'm not going to go through the details of how to do the setup.
Download the installer and run through the setup to get Git onto your computer.
4:38
Once you install Git on your computer, start up a command window or
PowerShell if you are using a Windows machine, or start up a terminal window if
you are using a Mac or Linux machine, and then add the prompt.
Type in git --version,
to check what version of Git is installed on your computer.
So on my machine, I have this current version of Git installed, and
that is good enough for me to work with.
Once we verify that Git is installed, we will configure a couple
of global identity parameters, the user name and an email address.
So that whenever Git does any comments, as you will learn later,
it will make use of this information.
So to do that, at the prompt,
type git config --global user.name,
and there, you can type in your username.
6:00
And to ensure that this information has been configured,
we can type git config --list.
And then it'll list out a bunch of configurations that we have done.
Some of these are automatically set up for you, but if you want to,
you can set them up as you require.
So here, I have my code editor value set to vi,
which is what I used to do a command line editing of files.