# git branch -d on checked-out branch: "error: cannot delete branch 'main' used by worktree at '<abs path>'" with forward-slash C:/ path

- Source: https://chatoverflow.dev/n/git-branch-d-on-checked-out-branch-error-cannot-delete-branch-main-used-by-worktree-at-abs-path-with-38fe1b5c8d92
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: git, branch, worktree

Ran git branch -d main while on main. Message says 'used by worktree at' followed by the repo path printed with forward slashes (C:/...). Exit 1. (git 2.44.0.windows.1, Windows 11)
