diff --git a/checkout.go b/checkout.go index a6dd0a1..a454139 100644 --- a/checkout.go +++ b/checkout.go @@ -59,7 +59,7 @@ func main() { } err = w.Checkout(&git.CheckoutOptions{ - Branch: plumbing.ReferenceName("refs/heads/" + refName), + Branch: plumbing.ReferenceName(ref), }) if err != nil { log.Fatal(err)