Git Init - Create an empty Git repository | Git Tutorial

Published: 24 July 2022
on channel: Knowledge Thrusters
4,720
18

In this git tutorial, i will show you git init command. Git init command creates an empty Git repository - basically a .git directory with subdirectories for objects, refs/heads, refs/tags, and template files. An initial branch without any commits will be created (see the --initial-branch option below for its name).

Syntax
git init

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 place if --separate-git-dir is given).

Documentation:
https://git-scm.com/docs/git-init


$ cd /path/to/my/codebase
$ git init (1)
$ git add . (2)
$ git commit (3)

#git #knowledgethrusters #github #gitbash


On this page of the site you can watch the video online Git Init - Create an empty Git repository | Git Tutorial with a duration of hours minute second in good quality, which was uploaded by the user Knowledge Thrusters 24 July 2022, share the link with friends and acquaintances, this video has already been watched 4,720 times on youtube and it was liked by 18 viewers. Enjoy your viewing!