use refspec to set remote
This commit is contained in:
parent
707535e6fd
commit
9947e7c707
1 changed files with 3 additions and 0 deletions
3
main.go
3
main.go
|
@ -123,9 +123,12 @@ func Push(
|
|||
auth *githttp.BasicAuth,
|
||||
remote *git.Remote,
|
||||
) error {
|
||||
refspec := fmt.Sprintf("+refs/heads/*:refs/remotes/%s/*", DefaultRemoteName)
|
||||
|
||||
return remote.Push(&git.PushOptions{
|
||||
RemoteName: DefaultRemoteName,
|
||||
Auth: auth,
|
||||
RefSpecs: []config.RefSpec { config.RefSpec(refspec) },
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue