#topicpath
----


#contents

リポジトリのクローン、ローカルのブランチの作成、リモートのブランチへのプッシュの流れ


*** リポジトリのクローン [#y4ef8b87]
 $ git clone https://github.com/xxxx/hello.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.
 $ git clone https://github.com/masatomix/git-flow-sample.git
 Cloning into 'git-flow-sample'...
 remote: Counting objects: 8, done.
 remote: Compressing objects: 100% (7/7), done.
 remote: Total 8 (delta 2), reused 1 (delta 0), pack-reused 0
 Unpacking objects: 100% (8/8), done.
 Checking connectivity... done.
 
 $ cd hello

 $ cd git-flow-sample/
 $ git branch
 * master

masterブランチのクローンができました

*** ローカルのブランチの作成 [#y394a075]
 $ git branch -r
 $ git branch -ar
   origin/HEAD -> origin/master
   origin/master
 
 $ git branch dev
 
 $ git branch
   dev

 $ git branch develop    ←develop ブランチの作成

 $ git branch    ←確認
   develop
 * master

ローカルにブランチができました

 $ git checkout dev
 Switched to branch 'dev'
 $ git checkout develop    ← 移動
 Switched to branch 'develop'
 
 $ git branch
 * dev
 * develop
   master
作成したローカルのブランチに移動できました。


***リモートのブランチへのプッシュ [#pe43a514]

 $ git push origin dev
***リモートのブランチへのプッシュ [#pe43a514]
 $ git push origin develop
 Username for 'https://github.com': 
 Password for 'https://xxxxxxxx@github.com':
 Total 0 (delta 0), reused 0 (delta 0)
 To https://github.com/xxxxxx/hello.git
  * [new branch]      dev -> dev
 To https://github.com/masatomix/git-flow-sample.git
  * [new branch]      develop -> develop
 
 $ git branch -r
   origin/HEAD -> origin/master
   origin/dev
   origin/develop
   origin/master

リモートのブランチが作成されました。

 $ git branch
 * dev
   master



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

#comment

#topicpath

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


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS