Skip to main content

17 posts tagged with "learning-journey"

View All Tags

Git Worktree Trick: Merge Without Checkout! πŸͺ„

Β· 12 min read
Mahmut Salman
Software Developer

The Problem πŸ˜•β€‹

Backend Dev: "I want to merge my frontend branch into main, but when I try git checkout main, Git says 'fatal: main is already checked out at ../EcommerceWebsite3-backend'. I can't checkout main because it's being used in my backend worktree!"

Frontend Mentor: "Ah! This is a perfect situation to use one of Git's hidden superpowers - pushing to a local branch without checking it out!"

Git Rebase Logic: Why Can't I Just Merge? πŸ€”

Β· 17 min read
Mahmut Salman
Software Developer

The Confusion πŸ˜•β€‹

Backend Dev: "I'm looking at my Git history and I see that frontend branch has 13 commits that aren't on main, and main has 1 commit that frontend doesn't have. My mentor says I need to rebase. But... why? Why can't I just merge?"

Frontend Mentor: "Excellent question! This is where understanding the LOGIC of rebase becomes crucial. Let me show you exactly why rebase is necessary in this situation."

Git Worktree Magic: Do Commits Show Up in Other Worktrees? πŸͺ„

Β· 10 min read
Mahmut Salman
Software Developer

The Confusion πŸ˜•β€‹

Backend Dev: "I have two worktrees - one for frontend and one for backend. When I commit in the backend worktree, does it show up in the original worktree? And when I merge backend into main, what happens to the backend branch?"

Frontend Mentor: "Great question! This is where Git worktrees become really magical. Let me show you exactly what's happening in your setup."

Git Rebase's Two-Phase Mystery: Why Isn't It Just a Merge? πŸ€”

Β· 6 min read
Mahmut Salman
Software Developer

The Confusion πŸ˜•β€‹

Backend Dev: "I don't understand why we have Phase 2 in rebasing. I thought it would be as simple as running a merge command. But in rebase, I think we do merge command too? Why the extra step?"

Frontend Mentor: "Ah! This is one of the most common confusions about Git rebase. Let me show you what's really happening under the hood."

My 'Aha!' Moment: Why Public/Private Actually Matters (And I Was Wrong About Security)

Β· 14 min read
Mahmut Salman
Software Developer

"Why make something private? Just make everything public. If the coder knows which method to call, they call it. Problem solved, right?" That was me a week ago. I was so wrong. Here's my journey from "public/private is just fancy nonsense" to "holy crap, this actually makes sense!" 🀯