> ## Content Index
> Fetch the complete content index at: https://logbuch-dev-blog.nichedthemes.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# git worktree for a hotfix without stashing
- URL: https://logbuch-dev-blog.nichedthemes.com/git-worktree-for-a-hotfix/
- Published: 2026-10-08T12:20:00.000Z
- Updated: 2026-10-08T12:20:00.000Z
- Author: Mira Okafor
- Tags: Tooling, #til, #Import 2026-11-19 07:37

`git worktree add` checks out a second branch in its own folder. The half-done work stays where it is.

```console
$ git worktree add ../stummel-hotfix main
$ cd ../stummel-hotfix
$ git switch -c fix/query-string
```

`git worktree remove ../stummel-hotfix` cleans up once it is merged.