Skip to content

Latest commit

 

History

History
40 lines (33 loc) · 1.23 KB

01-git-init.md

File metadata and controls

40 lines (33 loc) · 1.23 KB

Up | Help | Create | Configure | Track | Branch | Sync | Revert | Inspect


git init

Creates a new repository in a given project folder.


Syntax

$ git init <repo> --bare        # Create a repo folder
$ git init <project>            # Create .git in the project folder

# Legend
-------------------------------------------------------------------------------
[]  : Optional
<>  : Replace
|   : OR

Examples

$ git init --bare project.git   # Bare folder names by convention
$ cd project.git                # Folder is visible

$ git init project              # Create .git in the project folder
$ cd project/.git               # Folder is hidden

$ git init                      # Create .git in the current folder
$ cd .git