Skip to content

Clone the Repository

These steps will walk you through cloning the Git repository from ADO onto your local, making and seeing changes, and pushing back to ADO. This is a simple repo using plain text Markdown.

You will work in your Git client to perform these commands and your code editor to make code changes.

The terminal executes commands relative to the defined directory. For this (and other labs), we recommend creating a dedicated folder to keep this work organized.

These commands will create a dojo folder in your user's home directory.

cd ~
mkdir dojo
cd dojo

Clone the repository

For this lab, we will use the git-intro repository in the Dojo Sandbox project. To get the repository from ADO onto your local, we run a git clone. This copies the repo from the remote and places onto your local.

In the git-intro repository within ADO, and click Clone. This reveals the method and the URL that you need.

Clone

If you setup the SSH keys above, select the SSH method and copy command (otherwise you can use HTTPS and use the Git Credentials when prompted below).

Clone SSH

Using this URL, we can paste that into our local clone command

git clone git-url-repo

You should see a successful message. Additionally, you can validate it cloned by running the ls command to see the contents inside your dojo folder (you should see the git-intro repo as a folder).

Clone SSH

To perform Git commands in the following steps, ensure that your terminal is in the git-intro directory.

cd git-intro