638 B
638 B
title, tags
| title | tags |
|---|---|
| Create a new repository | repository,beginner |
Initializes a new git repository, setting up all the configuration files needed by git.
- Use
git initto initialize an empty repository in the current directory. - Alternatively, use
git init [<directory>]to initialize the repository in the specified<directory>. - Note: Running
git initin an existing repository is safe. - Note: You only need to run
git initonce per repository.
git init [<directory>]
cd ~/my_project
git init # Initializes a repo in ~/my_project
cd ~
git init my_project # Initializes a repo in ~/my_project