Git 仓库

获得 Git 仓库有两种方式,第一、仓库不存在,使用 git init 创建仓库。第二、远程仓库已存在,通过克隆的方式创建仓库。

1. 创建仓库

$ git init <repo>

repo 可省略,如果省略,则表示在当前目录下面创建仓库。

2. 克隆仓库

$ git clone git@host:/path/to/repository 
$ git clone git@host:/path/to/repository rename_repository # clone 之后重命名仓库

results matching ""

    No results matching ""