GitHub compare view for current versions of branches

后端 未结 2 534
悲哀的现实
悲哀的现实 2021-02-04 06:22

Is there a way to use GitHub\'s \"compare view\" to view the diff between the current versions of two branches? (That is, to view the same diff that you would get if y

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-04 06:36

    GitHub only supports the triple dots (...) range shortcut specification.

    From the git diff documentation:

    git diff [--options] .. [--] […]

    This is synonymous to the previous form. If on one side is omitted, it will have the same effect as using HEAD instead.

    git diff [--options] ... [--] […]

    This form is to view the changes on the branch containing and up to the second , starting at a common ancestor of both . "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B". You can omit any one of , which has the same effect as using HEAD instead.

提交回复
热议问题