Initial Setup in Git
From the Git cheat sheet · Getting Started · verified Jul 2026
Initial Setup
Configure Git for first time use with your identity
bash
# Set user info (required for commits)
git config --global user.name "Your Name"
git config --global user.email "email@example.com"
# Set default branch name
git config --global init.defaultBranch main
# Check settings
git config --list💡 Use --global for system-wide settings
📌 Local config overrides global settings
⚡ Set your editor for commit messages and conflicts