Skip to content

Creating a repository

You can create repositories by running git init. This will create a .git directory that will contain all of the repository information.

There are two common ways to use git init:

  1. Create an empty repository in the current directory, by running:

    git init
    
  2. Create an empty repository in a specific directory, by running:

    git init path/to/repository
    

    Info

    Git will create the repository directory if it does not exist.