diff --git a/go/libraries/doltcore/sqle/dprocedures/dolt_checkout.go b/go/libraries/doltcore/sqle/dprocedures/dolt_checkout.go index 53b0857ec5..65e9153df1 100644 --- a/go/libraries/doltcore/sqle/dprocedures/dolt_checkout.go +++ b/go/libraries/doltcore/sqle/dprocedures/dolt_checkout.go @@ -163,7 +163,7 @@ func doDoltCheckout(ctx *sql.Context, args []string) (statusCode int, successMes } validRemoteRefExists := remoteRefs != nil && len(remoteRefs) >= 1 - `` + if dashDashPos == 1 && (localRefExists || validRemoteRefExists) { // dolt checkout --: disambiguates a tracking branch when it shares a name with local table(s). if apr.NArg() == 1 { // assume some specified because dashDashPos is 1