LoginSignup
29

More than 5 years have passed since last update.

【GitHub】Gitで、リモートにあるブランチをローカルリポジトリに取り込む話【コードレビューを頼まれた時など】

Last updated at Posted at 2014-08-27

コードレビューを頼まれたりした時、GitHub上でコードを見たりすることもできるけど、それだと実行することができなかったりしてつらいので、ローカルのリポジトリに取り込みたいよねって話。

git checkout -b remote-branch origin/remote-branch

コレでイケます。

また、originにあるブランチなら、

git checkout remote-branch

でイケるそうです。
(コメント欄より。 uasiさんありがとうございます!)

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
29