2015-10-22 08:31:52 +01:00
|
|
|
# git init
|
2014-03-09 12:20:13 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Initializes a new local Git repository.
|
2019-06-03 01:06:36 +01:00
|
|
|
> More information: <https://git-scm.com/docs/git-init>.
|
2014-03-09 12:20:13 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Initialize a new local repository:
|
2014-03-09 12:20:13 +00:00
|
|
|
|
|
|
|
`git init`
|
|
|
|
|
2021-05-19 16:20:16 +01:00
|
|
|
- Initialize a repository with the specified name for the initial branch:
|
|
|
|
|
|
|
|
`git init --initial-branch={{branch_name}}`
|
|
|
|
|
2021-01-07 14:06:38 +00:00
|
|
|
- Initialize a repository using SHA256 for object hashes (requires Git version 2.29+):
|
2020-10-30 12:28:18 +00:00
|
|
|
|
|
|
|
`git init --object-format={{sha256}}`
|
|
|
|
|
2016-01-21 12:08:45 +00:00
|
|
|
- Initialize a barebones repository, suitable for use as a remote over ssh:
|
2014-03-09 12:20:13 +00:00
|
|
|
|
2015-10-22 08:31:52 +01:00
|
|
|
`git init --bare`
|