Create & Clone Repositories in Git
From the Git cheat sheet ยท Getting Started ยท verified Nov 2026
Create & Clone Repositories
Start a new project or get an existing one
bash
# Create new repository
git init
git init <directory>
# Clone existing repository
git clone <url>
git clone <url> <directory>
# Clone and check out a specific branch
git clone -b <branch> <url>๐ก Clone creates a full copy with history
โก Use shallow clone for faster downloads
๐ Init creates a new .git directory
๐ --depth implies --single-branch
Continue with Git
Save the full cheat sheet or work through every related task.