We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d606077 commit ab4ce61Copy full SHA for ab4ce61
_examples/checkout-branch/main.go
@@ -35,7 +35,7 @@ func main() {
35
// ... checking out branch
36
Info("git checkout %s", branch)
37
38
- branchRefName := fmt.Sprintf("refs/heads/%s", branch)
+ branchRefName := plumbing.NewBranchReferenceName(branch)
39
branchCoOpts := git.CheckoutOptions{
40
Branch: plumbing.ReferenceName(branchRefName),
41
Force: true,
0 commit comments