Andreas Heiduk <andreas.heiduk@xxxxxxxxxx> writes: > A `git fetch . origin/master:master` protects the currently checked out > branch (HEAD) unless the `-u/--update-head-ok` is supplied. This avoids a > mismatch between the index and HEAD. BUT branches which are HEADs in other > working trees do not get that care - their state is silently screwed up. > > Is this intended behaviour or and just an oversight while implementing > `git worktree`? The latter. "git worktree" is an interesting feature and has potential to become useful in wider variety of workflows than it currently is, but end users should consider it still experimental as it still is with many such small rough edges like this one. Patches to help improving the feature is of course very welcome.