Git-clone-operation

提供:Dev Guides
移動先:案内検索

Git-クローン操作

Gitサーバーにベアリポジトリがあり、Tomも最初のバージョンをプッシュしました。 これで、ジェリーは自分の変更を表示できます。 クローン操作は、リモートリポジトリのインスタンスを作成します。

Jerryは、ホームディレクトリに新しいディレクトリを作成し、クローン操作を実行します。

[jerry@CentOS ~]$ mkdir jerry_repo

[jerry@CentOS ~]$ cd jerry_repo/

[jerry@CentOS jerry_repo]$ git clone [email protected]:project.git

上記のコマンドは、次の結果を生成します。

Initialized empty Git repository in/home/jerry/jerry_repo/project/.git/
remote: Counting objects: 3, done.
Receiving objects: 100% (3/3), 241 bytes, done.
remote: Total 3 (delta 0), reused 0 (delta 0)

Jerryはディレクトリを新しいローカルリポジトリに変更し、ディレクトリの内容をリストします。

[jerry@CentOS jerry_repo]$ cd project/

[jerry@CentOS jerry_repo]$ ls
README