
The Ultimate Git Commands Cheatsheet (2026)
Git is the backbone of modern software development. Whether you are a solo developer or part of a 500-person engineering team, the same core commands move your code from idea to production. This cheatsheet covers every essential Git command you will reach for daily — organized by category, with real examples you can copy directly into your terminal. Bookmark this page. You will be back. Want an interactive experience? Try our Git Cheatsheet Interactive Tool and Git Command Builder . Setup & Configuration # Set your identity (required for commits) git config --global user.name "Your Name" git config --global user.email "you@example.com" # Set default branch name git config --global init.defaultBranch main # Set preferred editor git config --global core.editor "code --wait" # View all config git config --list # View a specific setting git config user.email Pro tip: Use --global for machine-wide settings and omit it for per-repo overrides. Repository Initialization # Create a new repo git
Continue reading on Dev.to Tutorial
Opens in a new tab




