MCPcopy Create free account
hub / github.com/go-git/go-git / PlainInit

Function PlainInit

repository.go:245–249  ·  view source on GitHub ↗

PlainInit create an empty git repository at the given path. isBare defines if the repository will have worktree (non-bare) or not (bare), if the path is not empty ErrRepositoryAlreadyExists is returned.

(path string, isBare bool)

Source from the content-addressed store, hash-verified

243// if the repository will have worktree (non-bare) or not (bare), if the path
244// is not empty ErrRepositoryAlreadyExists is returned.
245func PlainInit(path string, isBare bool) (*Repository, error) {
246 return PlainInitWithOptions(path, &PlainInitOptions{
247 Bare: isBare,
248 })
249}
250
251func PlainInitWithOptions(path string, opts *PlainInitOptions) (*Repository, error) {
252 if opts == nil {

Calls 1

PlainInitWithOptionsFunction · 0.85