FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Git worktree like a boss
How-ToTools

Git worktree like a boss

via Dev.toPatrice Ferlet4h ago

If there’s one Git tool that few people know about, it’s “worktree.” Once you’ve mastered this tool, you’ll find it incredibly hard to do without it. But you have to use it the right way. Here’s a method I’ve been using for a very long time TL;DR In an empty directory: # 1. Clone the repo into a hidden .bare folder git clone --bare git@github.com:user/repo.git .bare # 2. Tell the root folder where the Git history is hidden echo "gitdir: ./.bare" > .git # 3. Fix the fetch configuration to see all remote branches git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" # 4. Create your first worktree (the main branch) git worktree add main git worktree add <name of the branch> # Each folder correspond to a branch, everything is centralized # Read the doc... or follow the article I provide you a script you can put in your PATH to ease the process. Take a look at the end of the article. First of all, what is a “worktree”? In the fast-paced world of software development, context

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles

I didn't think switching to a 4K webcam on my MacBook would make such a big difference
How-To

I didn't think switching to a 4K webcam on my MacBook would make such a big difference

ZDNet • 59m ago

When Systems Forget How to Learn
How-To

When Systems Forget How to Learn

Medium Programming • 1h ago

Planetary gravity
How-To

Planetary gravity

Dev.to • 2h ago

Building to Last: Engineering Software That Eliminates Tech Debt During Development
How-To

Building to Last: Engineering Software That Eliminates Tech Debt During Development

Medium Programming • 3h ago

MediatR: How to setup a Request Handler? — ASP.NET CORE
How-To

MediatR: How to setup a Request Handler? — ASP.NET CORE

Medium Programming • 4h ago

Discover More Articles