The Parallel Workflow Secret: Why Every Senior Engineer Should Master Git Worktree
Stop context-switching with git stash and start running multiple branches simultaneously without the overhead of duplicate clones.
Picture this: you’re deep in a massive feature. You’ve got changes everywhere… and suddenly, an emergency hotfix ticket lands on your desk. Production is down.
What do you do?
Do you git stash your mountain of changes and pray it all comes back correctly later?
Do you clone the entire repository again into a different folder, wasting time and disk space?
STOP. There is a much, much better way.
What if I told you that you could have multiple branches checked out at the same time, from the same repository? No stashing, no duplicate clones.
It’s called git worktree, and SmartGit makes it super easy.
Here’s my repository, with my big feature branch checked out. Now, for that payment glitch hotfix.
Instead of stashing, I just go to Repository -> Add Worktree.
I’ll pick a branch created from main for the hotfix... and specify a separate directory for this new worktree. SmartGit will then check out the branch into that location.
That’s it. A completely separate, clean working directory, checked out to the hotfix branch. I can now fix the bug, commit, and push, without ever touching my messy feature branch.
Now, watch this. SmartGit is smart.
See this little icon? SmartGit tells me feature_branch_5 is checked out elsewhere. If I accidentally try to switch to it here... it doesn’t throw an error. It instantly teleports me to the correct worktree window. It’s impossible to mess up.
But here’s the real magic: all these worktrees share the same brain.
I’ll make the hotfix commit in my hotfix worktree… and instantly, it appears in the log of my feature branch worktree.
No push, no pull, no fetch. It’s one repository, one shared history, but with multiple, independent workspaces. This is what makes it so much more powerful than separate clones or stash.
And when you’re done? Cleaning up is just as easy. Don’t just delete the folder.
In SmartGit, go to Repository -> Remove Worktree. It’s gone.
And if you did accidentally delete the folder from your file system? SmartGit has your back. Just run Repository -> Prune Obsolete Worktrees to clean up the internal references. Simple.
So, stop the git stash madness. Stop cloning your repos over and over.
Start using Worktrees in SmartGit and change the way you code.
If you know a developer who needs this trick, do them a favor and share this post. They’ll thank you for it.
🎁 Special Gift for You
I’ve got a couple of great offers: FREE & discount access to my video courses - available for a limited time, so don’t wait too long!
🔥 Modern Software Engineering: Architecture, Cloud & Security
Discount coupon RAKIA_SOFT_ENG_12🤖 The Agentic Engineering Bootcamp
Discount coupon AI_ASSISTED_ENG_12_N🔐 Secure Software Development: Principles, Design, and Gen-AI
FREE coupon RAKIA_SECURE_APPS_12FREE coupon RAKIA_API_DESIGN_12
🐳 Getting Started with Docker & Kubernetes + Hands-On
FREE coupon RAKIA_DOCKER_K8S_12⚡ Master Web Performance: From Novice to Expert
FREE coupon RAKIA_WEB_PERF_12
Liked this?
💡 🧠 I break down the real-world engineering wisdom they don’t teach in tutorials. Join my newsletter or my YouTube channel, where I help working developers and engineers navigate the evolving tech landscape with clarity and confidence.


