-
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] #22: Pull request, different branches inside one repo, both commits, no conflict #38
Comments
PR2 branch was derived from PR1 Option2: squash commits then mergeScenario abstract--> Different branches inside one repo, both Alice and Bob commit (to different files)
Results:
Data could be explored:
Detailed steps:Step0: prep
Step1: Alice committed on
|
,PR2 branch was derived from PR1 Option3: rebase and mergeScenario abstract--> Different branches inside one repo, both Alice and Bob commit (to different files)
Results:
Data could be explored:
Detailed steps:Step0: prep
Step1: Alice committed on
|
PR2 branch was derived from PR1
Scenario abstract
--> Different branches inside one repo, both Alice and Bob commit (to different files)
PR2 branch
(Pull-Request-2 branch) was derived fromPR1 branch
(Pull-Request-1 branch)PR2 branch
), Bob(PR1 branch
)PR2 branch
locallygit push origin PR2
PR1 branch
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
PR1
branch frommaster
branchtest22
as test file onPR1
PR2
branch fromPR1
branchContent of
![screen shot 2017-10-21 at 7 11 47 pm](https://user-images.githubusercontent.com/16771854/31857444-b6d97c56-b693-11e7-81e4-0bb18db34cdc.png)
test22
:Startpoint - project tree:
![screen shot 2017-10-21 at 7 13 06 pm](https://user-images.githubusercontent.com/16771854/31857453-e5e8f0da-b693-11e7-8436-c1a84e49db50.png)
Step1: Alice committed on
PR2
, pushed back to remoteThe edit on the file
![screen shot 2017-10-21 at 7 14 20 pm](https://user-images.githubusercontent.com/16771854/31857457-104a9f9a-b694-11e7-926e-5575a445f122.png)
test22
is:After
![screen shot 2017-10-21 at 7 14 49 pm](https://user-images.githubusercontent.com/16771854/31857458-23d86952-b694-11e7-89b2-581c16ede4c2.png)
git push origin PR2
, here is the project status:Step2: Bob committed on
PR1
, pushed back to remoteThe edit on the file
test22-PR1
fromPR1
is:After
![screen shot 2017-10-21 at 7 18 00 pm](https://user-images.githubusercontent.com/16771854/31857477-933b6524-b694-11e7-8f18-ab84ed2fdac1.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-21 at 7 19 07 pm](https://user-images.githubusercontent.com/16771854/31857480-c0110a68-b694-11e7-9a6c-14431326666b.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-21 at 7 23 04 pm](https://user-images.githubusercontent.com/16771854/31857520-849d6340-b695-11e7-9cc4-46bd9c72aa88.png)
create a new pull request
:Here are details of the
![screen shot 2017-10-21 at 7 30 17 pm](https://user-images.githubusercontent.com/16771854/31857562-56a7e64e-b696-11e7-9e91-02ec16effccf.png)
![screen shot 2017-10-21 at 7 30 28 pm](https://user-images.githubusercontent.com/16771854/31857563-56c69c06-b696-11e7-9733-1865277cb1ea.png)
pull request
, created by Alice ( pull request: #37 ):Step4: Alice work is done, now Bob's turn. He needs to decide what to do with the pull request.
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
Check
PR1
andPR2
commit historyHistory of
![screen shot 2017-10-21 at 7 36 04 pm](https://user-images.githubusercontent.com/16771854/31857621-a7933ddc-b697-11e7-85ad-087c75ea7dc3.png)
PR1
branch:History of
![screen shot 2017-10-21 at 7 41 11 pm](https://user-images.githubusercontent.com/16771854/31857628-dc6ab792-b697-11e7-9fa5-26a721ab068b.png)
PR2
branch:Observations:
PR1
:PR2
got applied back toPR1
pull request
relatedmerge commit
created onPR2
PR2
:PR2
here)Details of the
![screen shot 2017-10-21 at 7 42 57 pm](https://user-images.githubusercontent.com/16771854/31857638-299fe4e2-b698-11e7-80a9-f3a7d20fe1b6.png)
merge commit
is:Pull
PR1
andPR2
to local again, merge, then push back to remoteThe project status becomes:
![screen shot 2017-10-21 at 7 46 50 pm](https://user-images.githubusercontent.com/16771854/31857664-aeaee962-b698-11e7-95a6-ee30f4df99f6.png)
Exploring question: Does commit order matters?
Answer: no, commit order not matter.
Scenario abstract
--> Different branches inside one repo, both Alice and Bob commit (to different files)
PR2 branch
(Pull-Request-2 branch) was derived fromPR1 branch
(Pull-Request-1 branch)PR2 branch
), Bob(PR1 branch
)PR1 branch
locallygit push origin PR1
base branch
commit first)PR2 branch
locallygit push origin PR2
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
test22_order_test
as test file onPR1
, push to remotePR1
andPR2
Content of
![screen shot 2017-10-21 at 8 01 51 pm](https://user-images.githubusercontent.com/16771854/31857752-b5441016-b69a-11e7-8c1a-2846e2213bf9.png)
test22_order_test
:Startpoint - project tree:
![screen shot 2017-10-21 at 8 02 43 pm](https://user-images.githubusercontent.com/16771854/31857758-d280027a-b69a-11e7-915f-d061ec245af1.png)
Step1: Bob committed on
PR1
, pushed back to remoteThe edit on the file
![screen shot 2017-10-21 at 8 03 31 pm](https://user-images.githubusercontent.com/16771854/31857760-ef7a5fba-b69a-11e7-8371-9c3501152c1a.png)
test22_order_test-PR1
fromPR1
is:After
![screen shot 2017-10-21 at 8 04 06 pm](https://user-images.githubusercontent.com/16771854/31857767-03cde7c0-b69b-11e7-9d3b-ae2ae454bcff.png)
git push origin PR1
, the project status is:Step2: Alice committed on
PR2
, pushed back to remoteThe edit on the file
![screen shot 2017-10-21 at 8 04 59 pm](https://user-images.githubusercontent.com/16771854/31857770-25cbe976-b69b-11e7-9538-830ae5f3c498.png)
test22
is:After
![screen shot 2017-10-21 at 8 05 42 pm](https://user-images.githubusercontent.com/16771854/31857772-3c71f44a-b69b-11e7-8523-c43a68ed7b17.png)
git push origin PR2
, the two branches diverge, here is the status ofPR2
:Here is the status of the whole project:
![screen shot 2017-10-21 at 8 05 56 pm](https://user-images.githubusercontent.com/16771854/31857773-47457932-b69b-11e7-87b8-118fc0533fdc.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-21 at 8 06 51 pm](https://user-images.githubusercontent.com/16771854/31857777-68dd036c-b69b-11e7-80c8-1b95a8074bd4.png)
create a new pull request
:Here are details of the
pull request
, created by Alice ( pull request: # ):Step4: Alice work is done, now Bob's turn. He needs to decide what to do with the pull request.
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-21 at 8 11 53 pm](https://user-images.githubusercontent.com/16771854/31857816-1b270806-b69c-11e7-93a3-b6ed9bf0cba5.png)
Check
PR1
andPR2
commit historyHistory of
![screen shot 2017-10-21 at 8 12 22 pm](https://user-images.githubusercontent.com/16771854/31857837-984694f0-b69c-11e7-9f50-60ee7b992027.png)
PR1
branch:History of
![screen shot 2017-10-21 at 8 15 41 pm](https://user-images.githubusercontent.com/16771854/31857839-a3c2bb06-b69c-11e7-8087-581ffe510f39.png)
PR2
branch:Observations:
PR1
:PR2
got applied back toPR1
( SHA the same asPR2
)pull request
relatedmerge commit
created onPR2
PR2
:PR2
here)Details of the
merge commit
is:Make a pull request the other way round
The project status becomes:
![screen shot 2017-10-21 at 9 52 24 pm](https://user-images.githubusercontent.com/16771854/31858348-59d9281e-b6aa-11e7-8c7c-97ac23143d0c.png)
The text was updated successfully, but these errors were encountered: