Skip to content

Instantly share code, notes, and snippets.

View ThomasFrans's full-sized avatar
🦀

Thomas Frans ThomasFrans

🦀
View GitHub Profile
@ThomasFrans
ThomasFrans / git-worktree.md
Last active August 10, 2024 13:21
A gentle introduction to Git worktree

A Gentle Introduction to Git Worktree

Git worktree has become a major part of how I use Git over the past year. Anytime I mention it somewhere however, I get reactions from people who have never heard about the feature. Others have heard about it, but don't know how exactly it works or why it's beneficial. That's why I decided to write a short tutorial/introduction on this awesome feature that is baked right into the very git you are already using. I hope this can help people discover worktrees and be a gentle introduction on how to get started using them.

What is Git worktree

Git worktree facilitates working with multiple branches. In a normal Git workflow, you can only ever have one branch checked out at a single time.