LoginSignup
0
1

More than 3 years have passed since last update.

GitHubのプルリク時とかで、特定のcommit間の差分を出す (ブランチ同士も可

Posted at

プルリクなんかで差分見せる時に、どこを見せたらわかりやすいかなと悩むことがある。
その場合、複数commitをまたいで、特定のcommit 2点間でdiffを取れたので報告。

compare

URLで指定するのが早そう。

https://github.com/<USER>/<REPOSITORY>/compare/<COMMIT HASH>...<BRANCH>

上記のように、repository名のあとに、compareとして、比較したい2つのコミット、ブランチを ... でつなぐ。
ここの指定については、 git diff の指定と同様にできそう。

diffの指定例
$ git diff 114514b fa52110

上記の git diff の例のように、コミット間でもブランチ間でも、ok

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