We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62e512f commit 53f5913Copy full SHA for 53f5913
_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