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

Method ResetHard

pkg/cmd/repo/sync/git.go:104–112  ·  view source on GitHub ↗
(ref string)

Source from the content-addressed store, hash-verified

102}
103
104func (g *gitExecuter) ResetHard(ref string) error {
105 args := []string{"reset", "--hard", ref}
106 cmd, err := g.client.Command(context.Background(), args...)
107 if err != nil {
108 return err
109 }
110 _, err = cmd.Output()
111 return err
112}

Callers

nothing calls this directly

Calls 2

CommandMethod · 0.80
OutputMethod · 0.65

Tested by

no test coverage detected