# What are git worktrees, and why should I use them?

DevFeed: [What are git worktrees, and why should I use them?](<https://devfeed.tech/articles/what-are-git-worktrees-and-why-should-i-use-them-67275.md>)

Original publisher: [Read original article](<https://github.blog/ai-and-ml/github-copilot/what-are-git-worktrees-and-why-should-i-use-them/>)

Author: Cassidy Williams

Published: 2026-06-16T20:58:54Z

Content type: tutorial

Language: en

Sources: [GitHub Blog](<https://devfeed.tech/sources/github-engineering.md>)

Topics: [parallel workspaces](<https://devfeed.tech/topics/parallel-workspaces.md>), [Git](<https://devfeed.tech/topics/git.md>)

Tags: [ai-ml](<https://devfeed.tech/tags/ai-ml.md>), [copilot](<https://devfeed.tech/tags/copilot.md>), [developer](<https://devfeed.tech/tags/developer.md>), [git](<https://devfeed.tech/tags/git.md>), [git-worktrees](<https://devfeed.tech/tags/git-worktrees.md>), [github-copilot](<https://devfeed.tech/tags/github-copilot.md>), [github-copilot-app](<https://devfeed.tech/tags/github-copilot-app.md>), [worktrees](<https://devfeed.tech/tags/worktrees.md>)

## AI overview

This tutorial explains how Git worktrees let developers work on separate branches in separate folders, preserving editor context and avoiding stash conflicts during urgent tasks or parallel sessions. It covers creating and removing a worktree, support in VS Code and the GitHub Copilot app, and tradeoffs including duplicated dependencies, folder cleanup, ignore rules, and Git's restriction on checking out one branch in two worktrees.

## Source excerpt

Git worktrees have been around since 2015, but it wasn't until recently they became popular. Learn what they are, how to use them, and why you might.