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