Mastering GIT: Version Control & SCM Essentials

🚀 Just learned GIT — and here's everything in one post! GIT = Global Information Tracker It's a Version Control & SCM (Source Code Management) tool used by every developer on the planet. 📦 THE 3 STAGES OF GIT: 1️⃣ Working Directory → where you create/edit files 2️⃣ Staging Area → files tracked after git add (modified files show here) 3️⃣ Repository → after git commit, files move here (hidden from git status) ⚙️ SETUP ✅ git init → initialize a repo ✅ git config --global user.name "name" → set author ✅ git config --global user.email "email" → set email ➕ STAGING & COMMITTING ✅ git add filename → stage a file ✅ git add . → stage everything ✅ git commit -m "message" filename → commit one file ✅ git status → check what's tracked/modified ✅ git log → recent commit history ✅ git log --follow -all filename → no. of commits on a file 🔁 UNDOING THINGS ✅ git reset --hard HEAD~N → delete N commits + changes ✅ git reset --soft HEAD~N → remove commit ID only (changes stay!) ✅ git reflog → see ALL history including deleted commits ✅ git cherry-pick <commit-id> → bring back a specific commit ✅ git commit --amend → change the last commit ID 🔒 .GITIGNORE ✅ vi .gitignore → open the ignore file ✅ Add filenames/patterns → they disappear from untracked files 💡 Key insight I had: 👉 --hard deletes the commit AND the file changes 👉 --soft only removes the commit ID — your work is safe 👉 reflog is your safety net — deleted commits aren't really gone! Still learning and documenting every step. Drop a comment if you're on this DevOps/Linux journey too! 🙌 #Git #VersionControl #DevOps #Linux #LearningInPublic #SoftwareEngineering #SCM #TechJourney #GitCommands #Developer

  • No alternative text description for this image

Nice post! Just a small note — Git doesn’t actually have an official full form. It’s just a name given by its creator.

To view or add a comment, sign in

Explore content categories