Difficulty: Beginner
Estimated Time: 10 minutes

This scenario steps you through the process of creating or initializing an empty local git repository. It also guides you to connect the newly created local repository with the remote repository.

Recap of what you did:

Checked if git is installed by typing 'git --version'

Printed the current working directory by typing 'pwd' in the editor window

Created a folder named 'mysample' by typing 'mkdir mysample' in the editor window

Moved in to 'mysample' folder by typing 'cd mysample' in the editor window

Typed 'git init' in the editor window to initialize the newly created folder.

Finally connected a remote repository using the command 'git remote add origin https://github.com//mysample.git'

Git Init

Step 1 of 3

Step 1

Check if git is installed and working properly:

Type the command git --version in the editor window on the right.

See if it displays the version of git.

If not, you may need to install git.