sorting out DETACHED HEAD