- 追加された行はこの色です。
- 削除された行はこの色です。
#topicpath
----
#contents
リポジトリのクローン、ローカルのブランチの作成、リモートのブランチへのプッシュの流れ
*** リポジトリのクローン [#y4ef8b87]
> git clone https://github.com/masatomix/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
hello> git branch
$ cd git-flow-sample/
$ git branch
* master
masterブランチのクローンができました
*** ローカルのブランチの作成 [#y394a075]
hello> git branch -r
$ git branch -ar
origin/HEAD -> origin/master
origin/master
hello> git branch dev
hello> git branch
dev
$ git branch develop ←develop ブランチの作成
$ git branch ←確認
develop
* master
ローカルにブランチができました
hello> git checkout dev
Switched to branch 'dev'
$ git checkout develop ← 移動
Switched to branch 'develop'
hello> git branch
* dev
$ git branch
* develop
master
作成したローカルのブランチに移動できました。
***リモートのブランチへのプッシュ [#pe43a514]
hello> git push origin dev
$ git push origin develop
Username for 'https://github.com':
Password for 'https://masatomix@github.com':
Password for 'https://xxxxxxxx@github.com':
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/masatomix/hello.git
* [new branch] dev -> dev
To https://github.com/masatomix/git-flow-sample.git
* [new branch] develop -> develop
hello> git branch -r
$ git branch -r
origin/HEAD -> origin/master
origin/dev
origin/develop
origin/master
リモートのブランチが作成されました。
hello> git branch
* dev
master
----
この記事は
#vote(おもしろかった,そうでもない)
#comment
#topicpath
SIZE(10){現在のアクセス:&counter;}