infoMore than 5 years have passed since last update.
git mergeの履歴の違いを図にして整理してみた
Last updated at Posted at 2015-01-05
これは何?
- git merge コマンドには、
--no-ff
オプションや--squash
オプションがあり。
- もう語り尽くされている部分ですが、それらの違いを整理して図にしてみたものです。
前提
- merge前のブランチは、
git rebase master
しておく。
git merge の履歴の違い
ネットワーク図的な特徴
- --no-ff : マージコミットが作られる + コミットログのネットワーク図を見ればどこから分岐してどこにマージされたのか視覚的にすぐわかる。
- --squash : コミットが1つにまとまって綺麗 + コミット履歴が1列になる + masterブランチとの関係性が途切れる
- オプションなし : コミット履歴が一列になる。(masterブランチとbranchXブランチが同じ位置にくる)
List of users who liked
20Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
What you can do with signing up