Config System
Configuring Git is basically giving your machine a passport and a handwriting style ✍️💻
1. Check if Git is installed
Open terminal / CMD / PowerShell:
Code Snippet
git --version
If installed, you’ll see something like:
Code Snippet
git version 2.49.0
If not, install from:
2. Set your username
Code Snippet
git config --global user.name "Your Name"
Example:
Code Snippet
git config --global user.name "Sathish Kumar"
3. Set your email
Use the same email connected to your GitHub/GitLab account.
Code Snippet
git config --global user.email "your@email.com"
Example:
Code Snippet
git config --global user.email "sathish@example.com"
4. Verify configuration
Code Snippet
git config --global --list
You’ll see:
Code Snippet
user.name=Sathish Kumar user.email=sathish@example.com
5. Set default branch name (recommended)
Code Snippet
git config --global init.defaultBranch main
6. Enable colorful output 🌈
Code Snippet
git config --global color.ui auto
7. Configure credential storage (important)
Windows
Code Snippet
git config --global credential.helper manager
This avoids typing password/token repeatedly.
8. Generate SSH key (best for GitHub)
Check existing key:
Code Snippet
ls ~/.ssh
Generate new key:
Code Snippet
ssh-keygen -t ed25519 -C "your@email.com"
Press Enter for defaults.
Start SSH agent:
Code Snippet
eval "$(ssh-agent -s)"
Add key:
Code Snippet
ssh-add ~/.ssh/id_ed25519
Copy public key:
Code Snippet
cat ~/.ssh/id_ed25519.pub
Then add it to:
9. Test GitHub connection
Code Snippet
ssh -T git@github.com
Expected message:
Code Snippet
Hi username! You've successfully authenticated.
10. First repo workflow 🚀
Code Snippet
git init git add . git commit -m "Initial commit"
Connect remote repo:
Code Snippet
git remote add origin YOUR_REPO_URL
Push:
Code Snippet
git push -u origin main
Useful daily commands
Code Snippet
git status git pull git add . git commit -m "message" git push
Git feels chaotic for 3 days, magical by day 7, and eventually becomes a time machine with trust issues ⏳🌌