GitHub如何形成拉取请求

OsQ*_*sQu 5 git github git-diff pull-request

我有一个分支,它已经将master合并了几次(以获得对该功能分支的最新错误修复).现在我想看看我在那个分支开始工作后所做的所有改变,所以我试过了git diff start_commit..HEAD.但是我注意到git也显示了那些合并的提交,所以这不是我想要的.

然后我尝试从该分支创建一个pull请求,看看是否同样适用于GitHub的pull请求,但是注意到pull请求只显示我想要的更改.

分支看起来像这样

master: A---B---C---D---E---F
         \       \       \
feature:  G---H---I---J---K---L
Run Code Online (Sandbox Code Playgroud)

问题是git diff A..L显示来自AL的所有提交,但是GitHub的pull请求只显示GL,这就是我想要的.

那么GitHub用来形成拉取请求的命令(或命令)是什么?

编辑:添加了图片

小智 4

看一下这个。来自 git 文档:

Comparing branches

    $ git diff topic master    <1>
    $ git diff topic..master   <2>
    $ git diff topic...master  <3>

1. Changes between the tips of the topic and the master branches.

2. Same as above.

3. Changes that occurred on the master branch since when the topic branch was started off it.
Run Code Online (Sandbox Code Playgroud)