mirror of
https://github.com/thegeeklab/wp-git-clone.git
synced 2024-11-09 17:50:39 +00:00
20 lines
318 B
Go
20 lines
318 B
Go
package git
|
|
|
|
import (
|
|
"github.com/thegeeklab/wp-plugin-go/v2/types"
|
|
"golang.org/x/sys/execabs"
|
|
)
|
|
|
|
// RemoteRemove drops the defined remote from a git repo.
|
|
func (r *Repository) Init() *types.Cmd {
|
|
args := []string{
|
|
"init",
|
|
"-b",
|
|
r.Branch,
|
|
}
|
|
|
|
return &types.Cmd{
|
|
Cmd: execabs.Command(gitBin, args...),
|
|
}
|
|
}
|