0
0
mirror of https://github.com/thegeeklab/wp-git-clone.git synced 2024-09-19 15:12:46 +02:00
wp-git-clone/git/init.go

20 lines
318 B
Go
Raw Normal View History

2023-12-23 00:59:23 +01:00
package git
import (
"github.com/thegeeklab/wp-plugin-go/v2/types"
2023-12-23 00:59:23 +01:00
"golang.org/x/sys/execabs"
)
// RemoteRemove drops the defined remote from a git repo.
func (r *Repository) Init() *types.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
}
return &types.Cmd{
Cmd: execabs.Command(gitBin, args...),
}
2023-12-23 00:59:23 +01:00
}