Open dorawyy opened 6 years ago
PR2
git checkout PR2
vim test28_pull_request
git add test28_pull_request
git commit -m "PR2: create file test28_pull_request: a=1,b=1,c=1"
git push origin PR2
PR2
(head branch) to PR1
(base branch)Only 1 commit, able to merge
PR1
, conflictgit checkout PR1
vim test28_pull_request
git add test28_pull_request
git commit -m "PR1:created file test28_pull_request a=0,b=1,c=1"
git push origin PR1
PR2
(head branch), also included into the pull requestPR1
(base branch), new conflictgit checkout PR1
vim test28_pull_request
git add test28_pull_request
git commit -m "PR1:edited test28_pull_request; 'a=1,', 'b=2,', 'c=1'"
git push origin PR1
PR1
branchPR2
(head branch)PR1' and
PR2`(head branch), new conflictgit checkout PR2
git pull origin PR2
rm test28_pull_request
git add test28_pull_request
git commit -m "PR2: remove file test28_pull_request"
git push origin PR2
PR2
history becomes:git checkout PR1
git pull origin PR1
vim test28_pull_request
git add test28_pull_request
git commit -m "PR1: edited file test28_pull_request: a=3,b=3,z=3"
git push origin PR1
PR1
history becomes:git fetch origin PR1
git fetch origin PR2
git checkout PR2
git merge PR1
Resolve the conflict by removing the file test28_pull_request
, then continue merge
git commit
git push origin PR2
PR1
and PR2
PR1
:PR2
:
Scenario:
Julia's note:
Scratch of the test case:
Applied branches:
PR1
andPR2
Start point
PR1
andPR2
in sync.