Getting Git

A comprehensive video course from git init to Git Master.

Master: git clone


In this video we'll learn some of the additional uses for git clone.

In init: git clone we covered the basic usage of git clone.

We can also pass git clone an argument to specify the install directory.

By default, git clone creates a directory using the same name as the project.

Let's navigate back to our workspace and run git clone again, but also pass it a second argument of a directory name.

In this case, I'll use gg.

We can see from the output it cloned into gg.

Let's take a step back and talk about the URL argument for git clone.

Often, this URL will be provided by the service where you're hosting your Git repository.

However, this can also be a file path to a Git repository.

Let's demonstrate this by running:

git clone gg gg2

From the output, we see git clone created a gg2 directory, but it did not need to download any data since the repository was local.

If we change into the gg2 directory, we'll see it's also a complete copy of our repository by running git status and git log.