# Stash / Worktree

## git stash


## git worktree
[git](https://git-scm.com/docs/git-worktree)
[gitkraken](https://www.gitkraken.com/learn/git/git-worktree)
[use](https://www.hsbi.de/elearning/data/FH-Bielefeld/lm_data/lm_1359639/git/worktree.html)

### add new worktree

`git worktree add <path> <branch>`

* `--force` force creating a new worktree (e.g. create new worktree with already checked out branch)

### list worktrees

`git worktree list`


### remove unused worktree


`git worktree remove [-f] <worktree>`

* Unclean worktrees or ones with submodules can be removed with `--force` or `-f`.