---
title: "Git worktrees on a Mac"
description: "Check out more than one branch at a time with Git worktrees, each in its own folder, and see the coding agents that have one open."
url: https://getgita.app/uk/guides/git-worktrees
lang: uk
---

# Several branches, at the same time

A worktree is a second checkout of the same repository, so one branch can wait while you work on another.

Updated 2026-11-17

## The short answer

A worktree is another folder checked out from the same repository, on another branch. You can leave a feature mid-edit and open a hotfix beside it, with no stash.

## One branch per folder

A normal checkout holds one branch. Switching branches asks for a clean tree, which is why people stash. `git worktree add` makes a second working folder that shares the repository's objects and has its own HEAD. Each folder is a real checkout: its own files, its own build, its own uncommitted work.

## What you use it for

A review that should leave your current branch untouched. A long build in one folder while you edit in another. An agent working on a task in its own worktree while you keep the main checkout. Removing the worktree removes that folder. The commits stay in the repository.

## In gitā

Worktrees are listed with the repository, and the Worktrees & Agents pane shows the ones in use. Creating one checks out a branch in a new folder. The agents gitā finds are shown on the worktree they have open.

The page is [Worktrees](https://getgita.app/uk/features/worktrees).

## Questions, answered

### Is a worktree a second clone?

It is a second working folder that shares the repository. You do not download the history again.

### Can two worktrees use the same branch?

Git checks a branch out in one worktree at a time. A second folder needs a different branch, or a detached HEAD.

[All guides](https://getgita.app/uk/guides.md)

- **Завантажити для macOS:** https://github.com/rolottr/gita/releases/latest
- **Переглянути на GitHub:** https://github.com/rolottr/gita

---

Apple, macOS and Mac are trademarks of Apple Inc. Git is a trademark of Software Freedom Conservancy. GitHub is a trademark of GitHub, Inc. Vercel is a trademark of Vercel Inc. Claude is a trademark of Anthropic, PBC. gitā is independent software and is not affiliated with any of them. Завдання (Issues): https://github.com/rolottr/gita/issues
