I’m trying to push a commit hash to a branch, this is a fairly common pattern for us (to do deployments):
refSpecs := []config.RefSpec{
config.RefSpec(fmt.Sprintf("%s:refs/heads/release/%s", commit.Hash, env)),
}
err = r.Push(&git.PushOptions{
RemoteName: "origin",
RefSpecs: refSpecs,
}
However, this results in an already up-to-date error, which is definitely not true. The equivalent command on the CLI works without problem, so I’m assuming it’s not the RefSpec that’s wrong here.