0
0
mirror of https://github.com/thegeeklab/wp-git-clone.git synced 2024-11-23 16:40:41 +00:00
wp-git-clone/git/init.go

23 lines
356 B
Go

package git
import (
"os"
plugin_exec "github.com/thegeeklab/wp-plugin-go/v3/exec"
)
// RemoteRemove drops the defined remote from a git repo.
func (r *Repository) Init() *plugin_exec.Cmd {
args := []string{
"init",
"-b",
r.Branch,
}
cmd := plugin_exec.Command(gitBin, args...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return cmd
}