#topicpath
----


リモートのにあるmasterブランチ以外のブランチをおとしてくる方法です。


#contents


***masterブランチをclone [#n2eed9ac]
 $ git clone https://github.com/masatomix/git-flow-sample.git
 Cloning into 'hello'...
 remote: Counting objects: 3, done.
 remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
 Unpacking objects: 100% (3/3), done.
 Checking connectivity... done.
 
 $ cd hello
 $ git branch
 * master
masterしか見えない

 $ git branch -r
   origin/HEAD -> origin/master
   origin/develop
   origin/master
名前が確認できたので

*** developブランチをcheckout [#xfc735d5]
 $ git checkout -b develop  origin/develop
もしくは
 $ git checkout -t origin/develop
で、
 Branch develop set up to track remote branch develop from origin.
 Switched to a new branch 'develop'
 
 $ git branch
 * develop
   master
リモートのdevelopブランチが見られるようになりました。

このブランチdevelopはリモートのブランチからbranchしているので、
 $ git branch -vv
  develop     bbf5c22 [origin/develop] xxx
branch -vv コマンドで、リモートがブランチが紐付いていることが確認出来ますね。
branch -vv コマンドで、ブランチしたリモートブランチが紐付いていることが確認出来ますね。


----
この記事は
#vote(おもしろかった,そうでもない)

#comment

#topicpath

SIZE(10){現在のアクセス:&counter;}

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS