0
0
mirror of https://github.com/thegeeklab/wp-git-clone.git synced 2024-11-28 08:30:37 +00:00
wp-git-clone/git/init.go

20 lines
260 B
Go
Raw Normal View History

2023-12-22 23:59:23 +00:00
package git
import (
"golang.org/x/sys/execabs"
)
// RemoteRemove drops the defined remote from a git repo.
func Init(repo Repository) *execabs.Cmd {
args := []string{
"init",
2023-12-23 00:13:41 +00:00
"-b",
repo.Branch,
2023-12-22 23:59:23 +00:00
}
2023-12-23 00:13:41 +00:00
return execabs.Command(
2023-12-22 23:59:23 +00:00
gitBin,
args...,
)
}