- y: main
- z: PR-1
- w: PR-2 (based on PR-1)
x - y
\
z - w
- squash-merge z (PR-1) into y (main)
Due to this, Github says "Base automatically changed from PR-1
to main
" in PR-2.
At this point, z and z' don't have any relations in terms of git history.
x - y - z'
\
z - w
git merge z' # from z
The difference between y-z and y-z' are equivalent, so there is no conflict?
x - y - z'
\ \
z ---- z''
\
w
git merge z'' # from w
main (at z') becomes an ancestor of PR-2 (at w').
x - y - z'
\ \
z ---- z''
\ \
w ---- w'