LoginSignup
2
5

More than 5 years have passed since last update.

GitHubのリポジトリを自分のPCにcloneする

Last updated at Posted at 2015-11-23

公開されているリポジトリは自分のPCにclone(svnでいうとcheckout)ができます。

clone URLの種類

  • HTTPS
  • SSH
  • Subversion

の3種類があります。

clone URLの確認

リポジトリのトップ画面「https://github.com/ユーザー名/リポジトリ名」にURLとそのURLをPCのクリップボードにコピーをしてくれるボタンがあります。

cloneする

コマンドを実行すると現在のディレクトリにリポジトリの名前のディレクトリを作成してその下にソースコードが配置されるので、ソースコードを置きたいディレクトリに移動後、コマンドを実行してください。
今回はSSH URLを使用します。

$ git clone #GitHubのSSH URL#
Cloning into 'Hello-World'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (3/3), done.
Checking connectivity... done.
2
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
5