0
0
mirror of https://github.com/thegeeklab/wp-git-clone.git synced 2024-06-02 08:19:42 +02:00
wp-git-clone/git/init.go

23 lines
356 B
Go
Raw Normal View History

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