1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Git, GitHub】最速でブランチを作成し、プルリクを投げてマージする方法

Last updated at Posted at 2019-11-23

①新規ブランチ作成

対象ディレクトリに移動

ターミナルにて下記コマンドを実行

$ cd programming/code_training/

新規ブランチ作成

ターミナルにて下記コマンドを実行

$ git checkout -b hotfix-asobi

ブランチ切替 (既にブランチ作成済みの場合)

ターミナルにて下記コマンドを実行

$ git checkout hotfix-asobi

②コーディング

作成したブランチにてソースコードを編集

③ステージング、コミット、プッシュ

ターミナルにて下記コマンドを実行

# ステージング
$ git add *
# コミット
$ git commit -m "asobi"
# プッシュ
$ git push origin  hotfix-asobi

④プルリクエスト

  • リポジトリへアクセスし、「New pull request」ボタンを押下
  • マージしたいブランチを選択
  • 「Create pull request」ボタンを押下
  • 内容を入力
  • 「Create pull request」ボタンを押下

⑤マージ

  • マージしたいプルリクエストを選択し、「Merge pull request」ボタンを押下
  • 「Confirm merge」ボタンを押下
1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?