SyntaxStudy
Sign Up
Home Git Reference git init

git init

command

Initializes a new Git repository in the current (or specified) directory.

Syntax

git init [directory]

Example

bash
# Initialize in current directory
git init

# Initialize in a new directory
git init my-project
cd my-project