From: Kirill Likhodedov Date: Tue, 09 Feb 2016 14:54:01 GMT Subject: git worktree fails to recreate existing branch even with -B Message-ID: <344AE670-BF9A-4779-AFB0-50B870E1D488@jetbrains.com> Git doesn’t allow me to execute git worktree add -B where already exists in the repository. The command prints the following: Preparing (identifier ) fatal: Refusing to point HEAD outside of refs/ I’m trying to create a worktree on an existing branch , which should point to . This obviously should fail with “-b”, but I use “-B” and expect it to be reset to as mentioned in the docs: By default, -b refuses to create a new branch if it already exists. -B overrides this safeguard, resetting to . Do I miss something or there is a bug? Steps to reproduce: git init wt cd wt echo 'asd' > a.txt ; git add a.txt ; git commit -m initial git branch br1 git worktree add -B br1 ~/temp/br1 master Error message: Preparing /Users/loki/temp/br1 (identifier br1) fatal: Refusing to point HEAD outside of refs/ Thanks a lot! -- Kirill