git init's Examples

.

Initialize a git empty repository

This command is used to start a new repository.

git init [repository name]

Creates a new local repository with the specified argument

$ git init [project-name]

git init description test

git init test

This is for creating repo without staging area

git init --bare

This is for test

git init --blank

this is for test

git init --blue

Creates a new Git repository in the current directory.

git init 
 Initializes a .git folder in the current directory.

Initializes a new Git repository in the specified directory.Initializes a new Git repository in the specified directory.

git init my-repo 
 Creates a repository in the my-repo folder.

Creates a bare repository (no working tree, for servers).

git init --bare repo.git 
 Initializes a bare repository named repo.git.

Suppresses output during initialization.

git init --quiet 
 Silently initializes a repository.

Uses a custom template directory for the .git folder.

git init --template=/path/to/templates 
 Initializes using custom templates.

Places the .git directory in a separate location.

git init --separate-git-dir=/path/to/git-dir 
 Stores .git in /path/to/git-dir.

Sets the name of the initial branch (default is master or main).

git init --initial-branch=main 
 Creates a repository with main as the initial branch.

Initializes a shared repository for group access.

git init --shared=group 
 Sets up a repository with group-shared permissions.

Create a new Git repo in the current folder.

git init

DevOpsSchool
Typically replies within an hour

DevOpsSchool
Hi there 👋

How can I help you?
×
Chat with Us