mirror of
https://github.com/thegeeklab/wp-git-clone.git
synced 2024-11-09 17:50:39 +00:00
24 lines
375 B
Go
24 lines
375 B
Go
package git
|
|
|
|
import (
|
|
"os"
|
|
|
|
plugin_exec "github.com/thegeeklab/wp-plugin-go/v3/exec"
|
|
)
|
|
|
|
// RemoteAdd adds an additional remote to a git repo.
|
|
func (r *Repository) RemoteAdd() *plugin_exec.Cmd {
|
|
args := []string{
|
|
"remote",
|
|
"add",
|
|
"origin",
|
|
r.RemoteURL,
|
|
}
|
|
|
|
cmd := plugin_exec.Command(gitBin, args...)
|
|
cmd.Stdout = os.Stdout
|
|
cmd.Stderr = os.Stderr
|
|
|
|
return cmd
|
|
}
|