Skip to content

The Git Repository

A repository is a specific folder that you have instructed Git to track.

Initializing a repository

Before Git is able to track files, you first have to tell it to treat a specific directory as a repository. This is called initialising a repository and is done with the git init command.

# Initialize a repository in your current working directory
git init

Basically, from here on out, every change you will make to a file within this working directory will be tracked by Git.