How can I diff two branches in GitHub?

前端 未结 4 1028
醉话见心
醉话见心 2020-12-08 08:54

I am just wondering if there is a way to simply diff two branches in GitHub? I know GitHub has capacity to do it because when we do code-reviews it does list out all the dif

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 09:48

    Expanding on @Ari M's answer. URL format is as follows:

    https:///compare/...

    Note the difference between .. and ... (2 and 3 dots).

    2 dots: show all commits that TARGET has but SOURCE doesn't and commits that SOURCE has but TARGET doesn't.

    3 dots: show all commits that TARGET has but SOURCE doesn't. You usually want this.

    E.g. to see what was added in the gh-pages branch compared to master in linguist repo:

    https://github.com/octocat/linguist/compare/master...gh-pages

提交回复
热议问题