0
1

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.

Gitのコミットグラフ

Last updated at Posted at 2020-05-07

#ブランチの状況(コミットグラフ)を表示する
各ブランチがどのように進んでいるのか確認できる

  • コマンド
$ git log --graph --date-order --all --pretty=format:'%h %Cred%d %Cgreen%ad %Cblue%cn %Creset%s' --date=short
  • コマンド実行結果(例)
*   8768c7b  (HEAD -> master) 2020-05-08 (name) branch_aの作業をマージ
|\  
| * 8bff760  (branch_a) 2020-05-08 (name) 作業Aを完了
* |   e46e8ff  2020-05-08 (name) 緊急でbranch_bで作業した内容を反映
|\ \  
| * | f087b63  2020-05-08 (name) branch_bでb.txtを作成
|/ /  
| * 469afaa  2020-05-08 (name) branch_aでコミットしてみた
|/  
* 68ffd89  2020-05-08 (name) hello.txtの内容を修正
* a081e0c  2020-05-07 (name) 初めてのコミット

上記コマンドを「git graph」だけで実行できるようにする

  • エイリアスを設定
$ git config --global alias.graph "log --graph --date-order --all --pretty=format:'%h %Cred%d %Cgreen%ad %Cblue%cn %Creset%s' --date=short"
  • コマンド実行
$ git graph
0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?