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