既存のgitレポジトリのローカルコピーをとる。
$ git clone https://github.com/gray/webservice-google-reader.git Cloning into webservice-google-reader... remote: Counting objects: 374, done. remote: Compressing objects: 100% (157/157), done. remote: Total 374 (delta 161), reused 344 (delta 149) Receiving objects: 100% (374/374), 45.90 KiB, done. Resolving deltas: 100% (161/161), done.
githubを使っていれば、forkという方法を使って自分の領域の下にコピーをとることができる。その場合もgit cloneまでは同じ。違いはレポジトリのURL。自分の領域の下に作っているので、読み書きできる。
$ git clone git@github.com:*************/webservice-google-reader.git Cloning into webservice-google-reader... Enter passphrase for key '/home/**************************************': remote: Counting objects: 380, done. remote: Compressing objects: 100% (161/161), done. remote: Total 380 (delta 163), reused 344 (delta 149) Receiving objects: 100% (380/380), 46.32 KiB, done. Resolving deltas: 100% (163/163), done.
このとき出来るレポジトリは以下。
$ cd webservice-google-reader/ $ git remote show origin $ git remote show origin Enter passphrase for key '/home/**************************************': * remote origin Fetch URL: git@github.com:*************/webservice-google-reader.git Push URL: git@github.com:*************/webservice-google-reader.git HEAD branch: master Remote branch: master tracked Local branch configured for 'git pull': master merges with remote master Local ref configured for 'git push': master pushes to master (up to date)