Subject: Re: Bug? git worktree fails with master on bare repo

From: Kevin Daudt <[email-masked]>
Date: Tue, 11 Oct 2016 17:41:37 +0200

On Mon, Oct 10, 2016 at 08:06:47AM -0500, Michael Tutty wrote:
> 
> > If source repo's HEAD is "master", I got the same behavior (worktree add fails)
> 
> So if it's possible for a bare repo to have HEAD pointing at master,
> is there a safe way for me to change this (e.g., as a cleanup step
> before doing my actual merge process)?

You can change where HEAD points to in a bare repositor with `git
symbolic-ref HEAD <branch>`, but note that this changes what branch gets
checked out when cloning a repository. 

Where users would normally check out master by default, after changing
what HEAD points to, it would be that branch (or detached when HEAD
doesn't even point at a branch).