# Using git worktrees for parallel tasks

> A second checkout is cheaper than stashing when two tasks touch one repository.

Date: 2026-10-21  
Author: Nik  
Tags: git, workflow  
Source: https://devscratch.com/en/posts/git-worktrees

When two tasks touch the same repository, a second checkout is cheaper than stashing. `git worktree add ../task-b -b task-b origin/main` gives an isolated directory that shares the object store.

Remember that untracked files such as `.env` do not follow you there.

```bash
git worktree list
git worktree remove ../task-b
```
