MCPcopy Create free account
hub / github.com/cli/cli / UpdateRemoteURL

Method UpdateRemoteURL

git/client.go:189–200  ·  view source on GitHub ↗
(ctx context.Context, name, url string)

Source from the content-addressed store, hash-verified

187}
188
189func (c *Client) UpdateRemoteURL(ctx context.Context, name, url string) error {
190 args := []string{"remote", "set-url", name, url}
191 cmd, err := c.Command(ctx, args...)
192 if err != nil {
193 return err
194 }
195 _, err = cmd.Output()
196 if err != nil {
197 return err
198 }
199 return nil
200}
201
202func (c *Client) SetRemoteResolution(ctx context.Context, name, resolution string) error {
203 args := []string{"config", "--add", fmt.Sprintf("remote.%s.gh-resolved", name), resolution}

Calls 2

CommandMethod · 0.95
OutputMethod · 0.65