From b015a0c71e6536e782ce15c0bcd3930adf749b26 Mon Sep 17 00:00:00 2001 From: dadada Date: Tue, 31 May 2022 22:11:43 +0200 Subject: [PATCH] fix refspec for remote branch --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 1c1d18f..8c65af9 100644 --- a/main.go +++ b/main.go @@ -123,9 +123,12 @@ func Push( auth *githttp.BasicAuth, remote *git.Remote, ) error { + refspec := fmt.Sprintf("+refs/heads/*:refs/heads/%s/*", DefaultRemoteName) + return remote.Push(&git.PushOptions{ RemoteName: DefaultRemoteName, Auth: auth, + RefSpecs: []config.RefSpec { config.RefSpec(refspec) }, }) }