GIT-INIT(1) GIT-INIT(1) (NAME) git-init - (SYNOPSIS) git init [-q | --quiet] [--bare] [--template=] [--separate-git-dir ] [--object-format=] [--ref-format=] [-b | --initial-branch=] [--shared[=]] [] (DESCRIPTION) - .git objects refs/heads refs/tags . ( --initial-branch ). GIT_DIR ./.git . GIT_OBJECT_DIRECTORY sha1 $GIT_DIR/objects . git init . . git init ( --separate-git-dir). (OPTIONS) -q, --quiet . --bare (bare repository). GIT_DIR . --object-format= ( ) . sha1 ( ) sha256. sha1 . : SHA-256 SHA-1 . SHA-256 . . SHA-256 . --ref-format= . : files packed-refs. . reftable reftable. --template= . ( << >> .) --separate-git-dir= $GIT_DIR ./.git/ . . . -b , --initial-branch= . ( master Git 3.0 main ) . init.defaultBranch . --shared[=(false|true|umask|group|all|world|everybody|)] . push . core.sharedRepository $GIT_DIR . umask(2) . group : umask, false umask(2). --shared . group, true ( g+sx git ). umask(2) . umask ( umask 0022 group ( ) ). 0xxx . all, world, everybody group . `0` . umask(2) ( group all ). 0640 . 0660 ( x r ). receive.denyNonFastForwards push . . . (TEMPLATE DIRECTORY) $GIT_DIR . ( ) : o --template o $GIT_TEMPLATE_DIR o init.templateDir o : /usr/share/git-core/templates. << >> ( gitignore(5) ) . . .sample . githooks(5) . (EXAMPLES) $ cd /path/to/my/codebase $ git init (1) $ git add . (2) $ git commit (3) 1. /path/to/my/codebase/.git. 2. . 3. . (CONFIGURATION) git-config(1) . : init.templateDir . init.defaultBranch . init.defaultObjectFormat . --object-format= git-init(1) . GIT_DEFAULT_HASH . init.defaultRefFormat . --ref-format= git-init(1) . GIT_DEFAULT_REF_FORMAT . init.defaultSubmodulePathConfig git init git clone extensions.submodulePathConfig true . . false . (GIT) git(1) Git 2.55.0 2026-06-29 GIT-INIT(1)