-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[testcase notes] #23: Pull request, different branches inside one repo, both commits, conflict #56
Comments
PR2 branch was derived from PR1 Option2Scenario abstract--> Different branches inside one repo, both Alice and Bob commit (causing conflicts)
Results:
Data could be explored:
Detailed steps:Step0: prep
Content of Step1: Alice committed on
|
PR2 branch was derived from PR1
Scenario abstract
--> Different branches inside one repo, both Alice and Bob commit (causing conflicts)
PR2 branch
(Pull-Request-2 branch) was derived fromPR1 branch
(Pull-Request-1 branch)PR2 branch
), Bob(PR1 branch
)PR2 branch
, fileX, line Y, locallygit push origin PR2
PR1 branch
, fileX, line Y, locallygit push origin PR1
Results:
Option1: When
create a merge commit
,Option2: When
squash commits and merge
,Option3: When
rebase and merge
,Data could be explored:
Option1: When
create a merge commit
Option2: When
create a merge commit
Option3: When
rebase and merge
Detailed steps:
Step0: prep
test23
as test file onPR1
PR2
branch fromPR1
branchContent of
![screen shot 2017-10-22 at 12 35 28 am](https://user-images.githubusercontent.com/16771854/31859431-ee8da23a-b6c0-11e7-9812-1ddca69fc695.png)
test23
:Startpoint - project tree:
![screen shot 2017-10-22 at 12 36 17 am](https://user-images.githubusercontent.com/16771854/31859443-0aa7baaa-b6c1-11e7-9e6d-80f5adc08673.png)
Step1: Alice committed on
PR2
, test23, line14, pushed back to remoteThe edit on the file
![screen shot 2017-10-22 at 12 36 59 am](https://user-images.githubusercontent.com/16771854/31859452-23d4f0ce-b6c1-11e7-8e41-2c0362e05437.png)
test23
is:After
![screen shot 2017-10-22 at 12 37 33 am](https://user-images.githubusercontent.com/16771854/31859458-3703ca8a-b6c1-11e7-9028-1bdc6d4b5ac3.png)
git push origin PR2
, here is the project status:Step2: Bob committed on
PR1
, test23, line14,(same line as Alice), pushed back to remoteThe edit on the file
![screen shot 2017-10-22 at 12 38 17 am](https://user-images.githubusercontent.com/16771854/31859467-5150a5a2-b6c1-11e7-93a3-b7addbd2cc0b.png)
test23
fromPR1
is:After
![screen shot 2017-10-22 at 12 38 57 am](https://user-images.githubusercontent.com/16771854/31859475-687f7adc-b6c1-11e7-8654-8ca0822838c8.png)
git push origin PR1
, the two branches diverge, here is the status ofPR1
:Here is the status of the whole project:
![screen shot 2017-10-22 at 12 39 11 am](https://user-images.githubusercontent.com/16771854/31859480-734929e0-b6c1-11e7-8d68-f22c2102b923.png)
Step3: Alice made a pull request to merge
PR1
(base) andPR2
(head)This is the page that Alice will see when she
![screen shot 2017-10-22 at 12 39 48 am](https://user-images.githubusercontent.com/16771854/31859498-c5d423cc-b6c1-11e7-958b-44112c7e2ff9.png)
create a new pull request
:Here are details of the
![screen shot 2017-10-22 at 12 44 55 am](https://user-images.githubusercontent.com/16771854/31859557-5c975f40-b6c2-11e7-8dd5-f0e0815a9fe3.png)
![screen shot 2017-10-22 at 12 45 08 am](https://user-images.githubusercontent.com/16771854/31859558-5cb5cd40-b6c2-11e7-998b-95fee259cb4e.png)
![screen shot 2017-10-22 at 12 46 26 am](https://user-images.githubusercontent.com/16771854/31859562-760a0194-b6c2-11e7-90d7-30fc36c5f8e8.png)
pull request
, created by Alice ( pull request: #59 ):Note: merge conflict here
Step4: Alice work is done, now Bob's turn. He needs to decide what to do with the pull request.
Note: merge conflict here
Step5: Bob needs to resolve the conflict first
Bob can use web editor or command line to resolve the merge conflict;
![screen shot 2017-10-22 at 12 48 24 am](https://user-images.githubusercontent.com/16771854/31859583-d640750c-b6c2-11e7-8df3-e86b93d8067c.png)
In this test case, we simply use Web editor, might use command line in later test cases
Way1: web editor to resolve conflict
[open web editor]
![screen shot 2017-10-22 at 12 48 00 am](https://user-images.githubusercontent.com/16771854/31859631-342fad36-b6c3-11e7-9048-9243e206d1a1.png)
[resolve conflict]
![screen shot 2017-10-22 at 12 53 05 am](https://user-images.githubusercontent.com/16771854/31859694-e467fcc6-b6c3-11e7-88ce-acb283734ebd.png)
[merge back]
![screen shot 2017-10-22 at 12 53 17 am](https://user-images.githubusercontent.com/16771854/31859695-e4809f2e-b6c3-11e7-8fae-479827f99b07.png)
Now, come back to the pull request page
Note that option3: rebasing is disabled, which is because there is merge conflict before. If rebasing, will meet the same conflict again, which cannot be automatically resolved, Github then disabled that.
Git pull to local, check repo status
Commits history of
![screen shot 2017-10-22 at 1 06 42 am](https://user-images.githubusercontent.com/16771854/31859842-d9504a08-b6c5-11e7-87ef-a331ee1e0c40.png)
PR2
(head
branch)Details of the merge commit:
![screen shot 2017-10-22 at 1 07 36 am](https://user-images.githubusercontent.com/16771854/31859848-0d738cdc-b6c6-11e7-88ed-a6c7b73ee172.png)
Option1: Create a merge commit
Bob chose to
merge pull request
Bob filled in info when
merge pull request
Then the pull request is done
![screen shot 2017-10-22 at 1 19 34 am](https://user-images.githubusercontent.com/16771854/31859910-43ac58be-b6c7-11e7-8591-6b08a1079384.png)
Check
PR1
andPR2
commit historyHistory of
![screen shot 2017-10-22 at 1 26 01 am](https://user-images.githubusercontent.com/16771854/31859959-3eae076c-b6c8-11e7-88be-e0bda8b3555d.png)
PR1
branch:History of
![screen shot 2017-10-22 at 1 25 40 am](https://user-images.githubusercontent.com/16771854/31859972-5eff8cc0-b6c8-11e7-92b0-2c094a335574.png)
PR2
branch (head
repo, no change):Observations:
PR1
:PR2
( head branch) also applied herePR2
:PR1
Details of the
merge commit
is:Pull
PR1
andPR2
to local again, merge, then push back to remoteThe project status becomes:
![screen shot 2017-10-22 at 1 33 14 am](https://user-images.githubusercontent.com/16771854/31860015-0299eaf6-b6c9-11e7-84a2-ae261e232583.png)
The text was updated successfully, but these errors were encountered: