Added sorting branches by branch_ref.