Skip to main content
Added illustration to detail the post.
Source Link

I would think that as long as the first branch is not yet merged to e.g. master then your second PR will show all changes from the first as well.

If branch-for-first-PR is merged then your second PR will show only the changes done there.

branch1 --------------------------------
            |
            --- branch 2 ---
                           |
                           --- branch 3

Diff between branch 1 and branch 3 will also show changes done in branch2, but if:

branch1 --------------------------------------
            |              | Merge to branch 1
            --- branch 2 ---
                           |
                           --- branch 3 --- 

If Branch 2 is merged into branch1 at the start of branch 3 then :

Diff between branch1 and branch 3 will only show branch3 changes

I would think that as long as the first branch is not yet merged to e.g. master then your second PR will show all changes from the first as well.

If branch-for-first-PR is merged then your second PR will show only the changes done there.

I would think that as long as the first branch is not yet merged to e.g. master then your second PR will show all changes from the first as well.

If branch-for-first-PR is merged then your second PR will show only the changes done there.

branch1 --------------------------------
            |
            --- branch 2 ---
                           |
                           --- branch 3

Diff between branch 1 and branch 3 will also show changes done in branch2, but if:

branch1 --------------------------------------
            |              | Merge to branch 1
            --- branch 2 ---
                           |
                           --- branch 3 --- 

If Branch 2 is merged into branch1 at the start of branch 3 then :

Diff between branch1 and branch 3 will only show branch3 changes

Source Link

I would think that as long as the first branch is not yet merged to e.g. master then your second PR will show all changes from the first as well.

If branch-for-first-PR is merged then your second PR will show only the changes done there.