how to do "git push --force --mirror" with go-git #1055
Unanswered
coding-devops
asked this question in
Q&A
Replies: 2 comments
-
m not sure about using this push options : "RefSpecs: []config.RefSpec{"+refs/:refs/"}" is ok |
Beta Was this translation helpful? Give feedback.
0 replies
-
That is correct, pushOpts := &git.PushOptions{
RefSpecs: []config.RefSpec{
config.RefSpec("+refs/*:refs/*"),
},
Force: true,
}
err = remote.PushContext(context.Background(), pushOpts)
if err != nil {
return err
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
how to do "git push --force --mirror" with go-git
Beta Was this translation helpful? Give feedback.
All reactions