3
3

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の記事まとめ

3
Last updated at Posted at 2017-12-15

きっかけ

よくあるんですよねー、いい記事なのに忘れたりするパターン...
あくまで自分のメモがわりに載せるので気になったものはチェックしてみてください。

背景

チーム開発でのGitの使い方をまとめる機会があったので。。。

全体

GitHubの開発フロー
https://qiita.com/KokiEnomoto/items/cc155ef12227a6bf3376

ブランチ

作成するブランチの種類は以下の4つです。

  • master
  • develop
  • feature
  • fix

master

このブランチはリポジトリが作成された時に自動で作成されるブランチ。
開発が終わったプログラムを乗せるために利用する。
バグがあってはならない。

develop

このブランチは開発時に利用される。機能の追加をする時にはこのブランチからfeatureブランチを切る。
featureブランチで機能実装が終われば、そのブランチをdevelopブランチにマージする。

fix

developブランチにマージされたコードにバグがあッた場合、developブランチからこの種類のブランチを切る。

開発の流れ

ここではGithubでの開発の流れを説明する。

  1. リポジトリを作成する。この時にmasterブランチが同時に作成される。
  2. developブランチを作成する。
  3. featureブランチを作成して機能実装を行う。
  4. 機能実装が終わり次第、featureブランチからdevelopブランチへのプルリクエストを作成する。

機能追加

  1. developブランチからfeatureブランチを切る
  2. featureブランチで機能開発
  3. 機能が完成したらdevelopへのプルリクエストを作成
  4. プルリクエストが承認されたらfeatureブランチの削除

バグ修正

  1. developブランチからfixブランチを切る(e.x fix/header)
  2. バグ修正
  3. 修正が終わったらdevelopへのプルリクエストを作成
  4. プルリクエストが承認されたらfixブランチを修正

コミットメッセージ

gitのコミットメッセージの書き方
https://qiita.com/itosho/items/9565c6ad2ffc24c09364

gitのコミットメッセージの変更
https://qiita.com/piruty/items/2fbfd26fd8dcbfed592a

gitのコミットメッセージの変更(過去のものも)
https://www.backlog.jp/git-guide/reference/log.html

参考文献

https://qiita.com/KokiEnomoto/items/cc155ef12227a6bf3376
https://havelog.ayumusato.com/develop/git/e513-git_branch_model.html

3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?