LoginSignup
4

More than 5 years have passed since last update.

【覚書】Git で任意のツールを使ってdiffを取る方法

Last updated at Posted at 2013-04-21

自分用の覚書として。
gitconfigで簡単に設定出来れば良いんだけど少し探してみてよく分からなかった。
その代わりに以下の方法で解決出来たので当面はこれを使っていくことにする。

例)diffツールとしてmeldを使用する場合

$ meld <(git show HEAD~1:xxxx.cpp) xxxx.cpp

とか

$ meld <(git show HEAD~2:xxxx.cpp) <(git show HEAD~1:xxxx.cpp)

といった具合。
出力のリダイレクトはよく使うことがあるけど、入力では殆ど使ったことがなかった。
()でコマンドの出力結果も使えるのな。

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
4