LoginSignup
0
0

More than 5 years have passed since last update.

【Git】ローカルに存在しないリモートのブランチの作成方法

Last updated at Posted at 2018-03-07

ローカルに存在しないリモートリポジトリのブランチをローカルに反映させたいときは、以下の手順で作業を行う。

# リモートリポジトリのブランチの最新の状態をローカルに取得する
$ git remote update
Fetching origin
remote: Counting objects: 1, done.                                                                     
Unpacking objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0
From ssh://git.nantoka.com/project/repo
   7b654551..27241234  branch01 -> origin/branch01

# ブランチを作成しながら、切り替える
$ git checkout -t origin/branch01
0
0
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
0
0