(ctx context.Context, branch string)
| 676 | } |
| 677 | |
| 678 | func (c *Client) CheckoutBranch(ctx context.Context, branch string) error { |
| 679 | args := []string{"checkout", branch} |
| 680 | cmd, err := c.Command(ctx, args...) |
| 681 | if err != nil { |
| 682 | return err |
| 683 | } |
| 684 | _, err = cmd.Output() |
| 685 | if err != nil { |
| 686 | return err |
| 687 | } |
| 688 | return nil |
| 689 | } |
| 690 | |
| 691 | func (c *Client) CheckoutNewBranch(ctx context.Context, remoteName, branch string) error { |
| 692 | track := fmt.Sprintf("%s/%s", remoteName, branch) |