プルリクエストを投げるまでの手順です。
git switch
対応版です。
手順
ブランチをつくってきりかえる
一気にできる。
$ git switch -c develop
Switched to a new branch 'develop'
一応確認
$ git branch
* develop
master
addしてcommitしてpushする
コードを修正して
addして
$ git add delete_iroiro.py
commitして
$ git commit -m 'add delete'
[develop 179b2ed] add delete
1 file changed, 10 insertions(+), 4 deletions(-)
pushします
$ git push origin develop
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 12 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 515 bytes | 515.00 KiB/s, done.
Total 5 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote:
remote: Create a pull request for 'develop' on GitHub by visiting:
remote: https://github.com/takakabe/aws_tools/pull/new/develop
remote:
To https://github.com/takakabe/aws_tools.git
* [new branch] develop -> develop
プルリクエストなげる
GitHubにいって
compareのブランチえらんでプルリクエストのタイトルと文章をかいてクリエイトする。
チェックしてマージする
変更がいいかんじだったらマージする
後処理
GitHub上のブランチを消して
ローカルの方からも消してあげる
そのまえにブランチ切り替えて
$ git switch master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
マスターを最新にしてあげて
$ git pull origin master
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
From https://github.com/takakabe/aws_tools
* branch master -> FETCH_HEAD
b6702a2..14a5b5b master -> origin/master
Updating b6702a2..14a5b5b
Fast-forward
IAM/delete_iroiro/delete_irorio.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
さっきのブランチを削除
$ git branch -d develop
Deleted branch develop (was 179b2ed).
おしまい
おわり
実用Git
- 作者: Jon Loeliger,吉藤英明(監訳),本間雅洋,渡邉健太郎,浜本階生
- 出版社/メーカー: オライリージャパン
- 発売日: 2010/02/19
- メディア: 大型本
- 購入: 7人 クリック: 287回
- この商品を含むブログ (45件) を見る