Skip to content

Home

Create a new repository

Initializes a new git repository, setting up all the configuration files needed by git.

💬 Note

Running git init in an existing repository is safe.

💬 Note

You only need to run git init once per repository.

git init [<directory>]

# Examples
cd ~/my_project
git init # Initializes a repo in ~/my_project

cd ~
git init my_project # Initializes a repo in ~/my_project

More like this

Start typing a keyphrase to see matching snippets.