同一ファイルの異なるコミットの差分を確認する3つの方法

May 16, 2015

Git

[code lang=bash] $ git diff commit1 commit2 — path/to/file [/code]

gitのコマンドではこれで行ける。

Github

[code lang=html] http://github.com///compare/[…] [/code]

古いコミットを先に書く。

Compare

こんな感じになります。

例:

[code lang=text] https://github.com/morizotter/coggle-translations/compare/08dce802473fc8dd58dedd220c7606259ac6a108…1daa44e56fc8b90a5c333a03832ff5824a668c68 [/code]

SourceTree

Cmd押しながら比較したいコミットを2つ選択するだけで差分が出た!便利!

その他の参考記事


Profile picture

Written by morizotter who lives and works in Tokyo building useful things. You should follow them on Twitter