Continued from Part 1 – Making Changes, we would like to share our notes, NOT guidance, and invite you to give us candid feedback on our proposed walkthroughs that are related to the high-level workflow steps mentioned above:
walkthrough 3.1 – merging changes without a Pull Request
We will walk through a simple workflow so you can understand the mechanics of creating a simple conflicting change and merging the changes. We resume by using the same environment from the previous two walkthroughs, however, there is no dependency on the previous workflows.
Step
Instructions
1 Create topic branch X ꙱ - Done
Branch master to Doris/Topic/X.
Publish the Doris/Topic/X branch.
2 Create topic branch Y ꙱ - Done
Branch master to Doris/Topic/Y.
Publish the Doris/Topic/Y branch.
3 Change topic X branch and commit.
꙱ - Done
Make a change to a file in branch Doris/Topic/X, for example README.md.
Commit the change.
Synchronize the change (pull+push).
4 Change topic Y branch and commit.
꙱ - Done
Make a different change to the same part of the same file in branch Doris/Topic/Y.
Commit the change.
Synchronize the change (pull+push).
5 Merge topic X branch with main
꙱ - Done
Merge branch Doris/Topic/X with master.
As there is no merge conflict merge will complete automatically.
Commit the change.
Synchronize the change (pull+push).
6 Merge topic Y branch with main
꙱ - Done
Merge branch Doris/Topic/Y with master.
As expected, the merge completes with conflicts.
7
Resolve the conflicts
꙱ - Done
Select Resolve the conflicts.
To view the conflicting content changes, select Compare Files.
We have the option of picking the source or target, or manually fixing the merge conflict. For this happy path, we opt for Take Source.
Select Commit Merge to commit the merge changes.
8 Resolve the conflicts
꙱ - Done
Synchronize the change (pull+push).
At this point both the developer repo and the centralized repo are synchronized and conflict free.
walkthrough 3.2 – merging changes with a Pull Request
We will walk through another simple workflow, but using Pull Request, which is the recommended workflow.
Step
Instructions
1 - 4 Create conflict situation ꙱ - Done
Perform steps 1 to 4 as per merging changes without a Pull Request as above, but use different topic branches, for example Doris/Topic/A and Doris/Topic/B.
Basic steps:
꙱ Branch main –> Doris/Topic/A, then publish.
꙱ Branch main –> Doris/Topic/B, then publish.
꙱ Make, commit and sync change on Doris/Topic/A, then synchronize.
꙱ Make, commit and sync change on Doris/Topic/B, then synchronize.
5 Create Pull Requests for both topic branches
꙱ - Done ꙱ - Done
Create a Pull Request for Doris/Topic/A.
Create a Pull Request for Doris/Topic/B.
At this point we will have two Pull Requests, with no evidence of conflict.
3 Action Pull Request A
꙱ - Done
Review Pull Request for commit on branch Doris/Topic/A.
Approve, merge and complete the Pull Request.
As there was no merge conflict, an automatic merge occurred.
4 Action Pull Request B
꙱ - Done
Review Pull Request for commit on branch Doris/Topic/B.
Take note that the Ready for Merge has been replaced with a re-evaluate notification, which indicates that the target branch has been updated in the interim.
A re-evaluation highlights the Merge conflicts condition as expected.
Select Manual merge help… for more information.
5 Manually merge the changes
꙱ - Done
Perform the merge as recommended above.
Basic steps:
꙱ Pull changes into master and Doris/Topic/B branches.
꙱ Merge master into Doris/Topic/B and resolve conflicts.
꙱ Sync changes.
6 Action Pull Request B again
꙱ - Done
Review Pull Request for commit on branch Doris/Topic/B.
Approve, merge and complete the Pull Request.
As there was no merge conflict this time, an automatic occurred.
… to be continued in PART 4 - Converting a TFVC repository
Thoughts?
Comments
Anonymous
April 14, 2015
The comment has been removed