github.com/1800alex/go-git-cmd-wrapper@v1.1.0/init/doc.go (about) 1 /* 2 Package init git-init - Create an empty Git repository or reinitialize an existing one. 3 4 SYNOPSIS 5 6 Reference: https://git-scm.com/docs/git-init 7 8 git init [-q | --quiet] [--bare] [--template=<template_directory>] 9 [--separate-git-dir <git dir>] 10 [--shared[=<permissions>]] [directory] 11 12 DESCRIPTION 13 14 This command creates an empty Git repository - basically a .git directory with subdirectories for objects, refs/heads, refs/tags, and template files. An initial HEAD file that references the HEAD of the master branch is also 15 created. 16 17 If the $GIT_DIR environment variable is set then it specifies a path to use instead of ./.git for the base of the repository. 18 19 If the object storage directory is specified via the $GIT_OBJECT_DIRECTORY environment variable then the sha1 directories are created underneath - otherwise the default $GIT_DIR/objects directory is used. 20 21 Running git init in an existing repository is safe. It will not overwrite things that are already there. The primary reason for rerunning git init is to pick up newly added templates (or to move the repository to another 22 place if --separate-git-dir is given). 23 24 */ 25 package init