# Installing Git & First-Time Git Setup ## Goal Install Git on Ubuntu 24.04 and configure your identity and defaults. ## Install Git (Ubuntu 24.04) ```bash sudo apt update sudo apt install -y git git --version ``` ## Configure Identity (Required) ```bash git config --global user.name "Your Name" git config --global user.email "you@example.com" git config --global --list ``` ## Recommended Defaults ```bash # Default branch name for new repos git config --global init.defaultBranch main # Safer line endings for cross-platform projects git config --global core.autocrlf input # Colorized output git config --global color.ui auto # Preferred editor (choose one you use) git config --global core.editor nano # git config --global core.editor "code --wait" # git config --global core.editor vim ``` ## Verify Configuration ```bash git config --global --list cat ~/.gitconfig ``` ## Outcome Git is installed and your global identity and defaults are set.