LoginSignup
48

More than 3 years have passed since last update.

github,gitlab,bitbucketでの差分確認URLまとめ

Last updated at Posted at 2017-08-15

人にコードの差分を共有する際に、よく利用するのでメモ。
2017/8/15時点での仕様なので、変更される可能性がある。

追記) 2019/5/15 githubのURLが変更されていたので修正。
コミットハッシュは2dots, branch比較は3dotsという仕様になっている。

service url
github https://github.com/<user>/<repo>/compare/<from>..<to>.
gitlab https://gitlab.com/<user>/<repo>/compare/<from>...<to>
bitbucket https://bitbucket.org/<user>/<repo>/compare/<to>..<from>#diff

<from><to>の部分には、branch,tag,commitのハッシュのどれでも対応できる。レポジトリ比較の場合は、<user>:<branch>などで比較。
gitlabの場合は、ファイルの差分が上に出てくるのでスクロールしないとコードの差分が見れない。

詳細は、GitHub Helpのページ。

比較演算子が2dots/3dotsだったり、#diffが必要だったりと微妙な違いがあるので注意。

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
48