In this lab, you’ll create an empty Git repository on your local disk, and stage and commit content into it. You’ll also explore the repository on disk to see how content is mapped logically into the physical locations.
To complete this and all future labs in this book, you must have a working version of Git installed (2.0 or higher). If you don’t have a working version of Git installed, then you should first complete Connected Lab 1: Installing Git.
This lab contains several optional steps, as indicated by the label at the start of each one. These steps are not needed for you to understand or use Git. They only serve to explain the underlying repository structure on disk and how it is managed in case you are interested. Feel free to skip these steps or do the deep-dive, as you see fit.
This command creates a new git repository skeleton in a subdirectory named .git under the current directory—as indicated by the output message from the command. This means that you’re now able to start using other Git commands in the current directory.