| CompSci 308 Spring 2021 |
Advanced Software Design and Implementation |
When working on a team project, you will need to develop a flow of working that minimizes potential conflict between each person's new code, while regularly integrating the team's work so no one gets too far behind. The easiest way to do this is to give each person on the team their own "personal work space" to make changes and manage how these changes get integrated together. GIT provides branches to manage this kind of work and integrates different branches through merging. However, inevitably, conflicts occur where people need to think about how best to resolve distinct changes to the same piece of code — this lab attempts to provide you a place to practice dealing with these conflicts.
If you have not already done this week's reading, GIT ready: Branching and Merging, it may be helpful to do it before starting. Commands Summaries are also good resources that is useful to have handy!
In your Cell Society teams, complete the following activities today:
lab_browser into your own repository so you can edit, commit, and push your group's own changesSettings → Members to add your partner so both people in the group can access the same repository Maintainer role in the project and choose Add to Projectgit clone to copy the one, shared, forked repository to their individual machines so they can work on their own separate copiesgit push, git pull, and git merge directly as well as git pull to bring changes into your branch on your machineAt the end of class, use Gitlab's Merge Request to submit your group's poem and code back to the original organization repository's master branch to submit your group's progress. Do not worry about potential merge conflicts in this case, your request will not be approved.
Note, there is no discussion file for this lab but there should be a LOT of GIT commits!
Make sure the Title of your Merge Request is of the form "lab_browser - everyone's NetIDs".
For this part, both students will be making a lot of small simple edits (e.g., in comments or by creating new text files) so it may help to set little "goals" to keep track of what exactly you are trying to accomplish with each set of changes. If you have trouble coming up with your own goals, you can follow this exercise that makes a combined poem.
Start by editing a single file in the default master branch and make a series of tracked changes using the standard GIT commands (add and commit):
git push and git pull to understand how to integrate each person's changes and how make (and avoid making) conflicts when combining your changespush or notes a conflict when you pull — also try following some of the advice given in these messages!Once you have the basic idea of how to resolve a conflict, try creating separate branches (one for each person) and make more changes within your shared repository similar to these excellent online tutorials:
After each person is able to merge from their personal branch to master (and back) using the command line, take turns trying to do it again using a Merge Request:
master branchmaster branch back to their personal branchpull these changes back to their respective branches on their local machine in order to work with the resultsThe command line takes place on your local machine, the Merge Requests take place on the Gitlab server, and each offers a different experience with the process of integrating the changes. We think using Merge Requests is helpful for adding your changes to the team's code, but understand that it may be less clear for bringing their changes to your branch. Regardless of which style you use to manage your merges, we suggest this workflow in this course which is similar to the common practice of "protecting" the master branch, minimizing merge conflicts, and maximizing team involvement in the process of creating a combined codebase.
Continue practicing using the suggested workflow to complete the following tasks by having each person take one set of tasks and integrating the changes after each one is complete. You are encouraged to discuss the changes with each other as you make them (either for better understanding OpenJFX or to avoid conflicts), but they should be coded independently. Note, the Model changes should be very small and easy to complete (so most of the time will be spent figuring out the View changes together) but doing them while the View changes will better help simulate working together in a project.
Model Changes
|
Configuration Changes
|
View Changes
|