DEV Community

bblackwind
bblackwind

Posted on

Day 5 of My Coding Journey: Git Push & Pull – The Real Tug of War

So today, I finally moved from just “knowing” Git commands to actually using Git push and Git pull in VS Code like a pro (or at least trying). Trust me, Git Push & Pull feels less like coding and more like life advice.

Hook Joke:
“Git push is like sending a risky WhatsApp message to your crush , and Git pull is like checking if she replied back or left you on seen .”
(Translation for my non-desi friends: seen = no reply, just heartbreak )

🖥️ What I Did Today

Wrote some text in VS Code → saved it as version 1.
Changed the file → pushed it to GitHub as version 2.
Repeated this a couple of times till I felt like a DJ remixing my own code .
This gave me hands-on practice in:

git push command example → sending my changes to GitHub.
git pull command example → bringing the latest changes from GitHub to my local machine.

🔑 Understanding Git Push & Pull

1️⃣ Git Push Example
Think of your local repo = your kitchen .
Think of GitHub repo = your restaurant menu .
Whatever you cook (new code), you push it to GitHub so the world sees it.
Command:

git push origin main
Enter fullscreen mode Exit fullscreen mode

👉 This sends your local changes to GitHub’s main branch.
👉 In interview prep, if someone asks “How do you upload code to GitHub?” → This is the command you need.

2️⃣ Git Pull Example

Imagine your friend added a new dish to the restaurant menu 🥘.
To taste it in your kitchen, you pull the changes from GitHub to VS Code.
Command:

git pull origin main

Enter fullscreen mode Exit fullscreen mode

👉 This updates your local repo with the latest changes from GitHub.
👉 In interview revision, remember: Pull before you Push (avoids conflicts).

🎭 Real-Life Analogy

Git Push = Upload selfie to Instagram.
Git Pull = Refresh Instagram feed to see others’ selfies.
Simple, right? Except here, no filters, just pure code 📸.

⚡ My Learnings (Takeaway)

Git push vs pull is the backbone of collaboration.
Practicing with version 1 → version 2 in VS Code Git workflow made me realize how Git keeps a clean timeline of my progress.
Every push & pull = one step closer to not messing up in real projects .
✅ Git Revision Notes for Interview
git push origin branch_name → Send code to GitHub.
git pull origin branch_name → Get latest code from GitHub.
Always pull before you push (otherwise conflicts = war ⚔️).
Interview Tip: Git push vs pull is a very common question — be ready with examples.
🏁 Final Thoughts
Today felt like leveling up from “Git theory” to “Git reality.”
From now on, every time I push, I’ll remember it’s just like sliding into DMs — might work, might get rejected, but hey, at least I tried .

Top comments (0)