Git Learning: Mastering Git Log and Config Essentials

🚀 Git Learning in Action: From Confusion to Clarity While practicing Git, I explored git log, commits, and real-time scenarios — and here are some powerful takeaways 👇 🔹 Commit Basics (Important Insight) ✔️ git commit -am "message" → Works only for tracked files ❌ Won’t add new (untracked) files 👉 For new files: ✔️ git add file → git commit -m "message" 🔹 Quick Git Status Understanding ✔️ M → Modified (not staged) ✔️ ?? → Untracked file 👉 Use: git status -s → Short and clean output 🔹 Power of git log (My Favorite 🔥) ✔️ git log --oneline → One-line commits ✔️ git log -p -2 → Last 2 commits with changes ✔️ git log <file> → File-specific history ✔️ git log -n 2 → Limit commits ✔️ git log --grep="change" → Search commits ✔️ git log --since="2026-03-15" → Filter by date ✔️ git log --author="name" → Filter by author 💡 This helped me understand who changed what and when 🔹 Hidden Gem 💎 👉 git show <commit_id> ➡️ Shows exact changes in that commit 🔹 Git Config Essentials ✔️ git config --global user.name ✔️ git config --global user.email ✔️ git config --list 🔹 .gitignore Use Case 👉 Ignore unnecessary files like: *.log, *.docx, *.xlsx 🔹 Bonus Knowledge 🧠 👉 100644 in Git means: 100 → File type (text file) 644 → Permissions (rw-r--r--) 💡 Big Lesson: Understanding git log is like having a time machine for your code ⏳ 🔥 Small commands → Huge productivity boost Are you using git log effectively in your workflow? 🤔 #Git #DevOps #Learning #AWS #CICD #TechJourney #VersionControl #GitTips

To view or add a comment, sign in

Explore content categories