0
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 3 years have passed since last update.

チーム開発には欠かせないgitgubの機能、プルリクエストについて。

Last updated at Posted at 2021-08-02

この記事を作成したきっかけ...

MENTAのあだちんさんに環境構築を見てもらう機会があり、知らないコマンドや手順が多くいくらコードが書けるようになってもグループ開発ではgitが使えないと感じたので備忘録として残します。

プルリクエストとは

プルリクエストとは、開発者のローカルリポジトリでの変更を他の開発者に通知する機能です。プルリクエストは次のような機能があります。

・機能追加や改修など、作業内容をレビュー担当者や
 に通知される。
・ソースコードの変更箇所をわかりやすく表示

自分-->pull request-->レビュー担当-->Merge-->main

1.mainブランチに移動

ブランチを作る時は基本的にmainブランチからにする

$ git checkout main

2.現在のブランチを確認

$ git branch

*マークがついているのが参照中のカレントブランチ
main *
module1
module2

3.現在のブランチを元に新しいブランチを作成

$ git checkout -b module3

$ git branch

main
module1
module2
module3*

4.ファイルを変更してコミット

$ git add file-name
$ git commit -m "メッセージ"

5. GitHub上にPush

$ git push origin module3

参考記事

0
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
0
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?