(ctx context.Context, branch string)
| 616 | } |
| 617 | |
| 618 | func (c *Client) CheckoutBranch(ctx context.Context, branch string) error { |
| 619 | args := []string{"checkout", branch} |
| 620 | cmd, err := c.Command(ctx, args...) |
| 621 | if err != nil { |
| 622 | return err |
| 623 | } |
| 624 | _, err = cmd.Output() |
| 625 | if err != nil { |
| 626 | return err |
| 627 | } |
| 628 | return nil |
| 629 | } |
| 630 | |
| 631 | func (c *Client) CheckoutNewBranch(ctx context.Context, remoteName, branch string) error { |
| 632 | track := fmt.Sprintf("%s/%s", remoteName, branch) |