LoginSignup
58
54

More than 5 years have passed since last update.

git log --oneline のお供に --no-merges

Posted at

git-log-graph-oneline

このようなコミットグラフを描く時、簡潔に表示させようと --graph を抜くと、

git-log-oneline

と表示されます。

しかし、マージコミットが多く、実際の変更コミットが埋もれてしまいますよね。
そこで --no-merges オプションを付けてみましょう。

git-log-oneline-nomerges

すごく簡潔になりました!
とはいえ、このままでは情報が少なすぎるので --pretty で表示を調整しましょう。

$ git log --no-merges --date=short --pretty='format:%C(yellow)%h %C(green)%cd %C(blue)%an%C(red)%d %C(reset)%s'

git-log-nomerges-pretty

good!

ちなみに

--no-merges の逆に、マージコミットのみにする --merges オプションもありますよ。

58
54
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
58
54