Git-クローン操作

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

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

[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