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?

Gitの運用 ワークフロー

1
Posted at

ローカルで一般的な流れ

①リモートリポジトリから最新のコードを取得

git pull

②ローカルブランチを作成

※よく使うブランチ名:
main ベースソースであるブランチ
develop 実装やテスト用ブランチ
feature/xxx 機能の実装用ブランチ
bugfix/xxx バッグ対応用ブランチ
hotfix/xxx 緊急対応用ブランチ

git checkout -b <branch_name>

③ソースのステータスを確認

git status

④更新した内容を追加

git add .
git add <filepattern>

⑤更新した内容をコミット

git commit -m "コミットメッセージ"

⑥リモートリポジトリにプッシュ

git push -u origin <branch_name>

チームワークで一般的な流れ

上記の⑥からさらに一歩を踏まえ

①リモートリポジトリでプルリクエストを作成

ツールによってレイアウトは違いますが、一般的な流れとして
・出典ブランチと目的地ブランチをそれぞれ選択
・プルリクエストのタイトルと説明を書く
・レビュアーを設定
・プルリクエストを作成

②プルリクエストのソースコードをレビュー

・ソースコードを確認し、欠点を指摘
・担当者に指摘の対応を依頼

③プルリクエストをクローズ

・問題なければ目的地ブランチにマージし、該当プルリクをクローズ

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?