LoginSignup
13
5

More than 1 year has passed since last update.

VScode git graph で任意の2commit 間のdiff を見る方法

Posted at

git history や git Lens でのやり方はググればすぐ出てくるが、git graph でのやり方が判りにくかったので備忘録として記載しておきます。
commit の新しい方を newer, 古い方を older とします。

  1. git graph の通常画面
    image.png
  2. newer をクリック
    image.png
    このcommit の詳細が表示される。ここで、緑と赤の数字は直前のcommit からの変更を示す(増加行数と減少行数)。
  3. コントロールキーを押しながらolder をクリックする。
    image.png
    2つのcommit が選択された状態になる(VScode の default style では背景の黒が白っぽくなる)。緑と赤の数字は、このolder からの変更を示す。
  4. newer のファイル名をクリックする。
    image.png
  5. older と newer の差分が表示される
    image.png

以上です。慣れれば簡単ですね!

13
5
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
13
5