CPNT 201
Assignment 2 - Git Merge Conflict
Weight: 20%
Due:
Late Penalty: 10% deduction for each day late. Submissions will not be accepted more than three days late.
Instructions
In a group, practice creating and resolving merge conflicts in a codebase. This is a small but very important skill to practice as when you are working with other developers, merge conflicts will occur and you will be expected to be able to resolve them properly.
Your instructor will assign the groups. This assignment should be able to be completed by the end of labtime, however it’s recommended to practice a few times together to build good habits.
1. Git Collaboration
- Choose one person to create a new repository on GitHub;
- Once the repo is created, the owner should invite their partner as a Collaborator.
- Once you both have access to the repo play at least two rounds of commit catch while pair programming.
The goals and content of the repository and paired coding session are up to you. Some suggestions:
- Collaborate on a joint journal entry
- Write a poem together
- Pick a topic to Google and compile the best search results
2. Resolve a merge conflict
While pair coding, each of you should resolve a merge conflict.
- Both of you edit the same line of code;
- One of you should push your changes first (or you can race);
- The other partner will then have to pull code and resolve a merge conflict
- Note: you can practice merge conflicts on your own by following this activity: Create a merge conflict on purpose (by yourself)
- Repeat the process, having the other partner resolve a conflict.
Submission Instructions
Note: Although you will complete this assignment with a partner(s), this will be marked as an individual assignment. Each you will have to upload a submission to Brightspace.
Once you’ve completed your pair-code session, each of you has resolved TWO merge conflicts and pushed your up-to-date code to GitHub:
- Download a ZIP of the repo from GitHub and submit to Brightspace;
- As a comment on the submission:
- add a link to the repo you created with your partner(s);
- add links to the specific commits that YOU pushed to resolve the conflict (example commit):
- it has two parents listed.
- “Resolved conflict” is in the commit message
- There is no left over text from VS Codes merge wizard
Marking Rubric
- Repo with all collaborators 5 Points
- repo is named
cpnt201-a2
; - repo has an owner and with the other partner(s) listed as a collaborator(s);
- repo contains at least two alternating commits (NOT including the resolved conflict below) from each partner (four commits at minimum; six for a group of three) within the same time period (i.e. during a pair coding session).
- repo is named
- 2 Merge Commits: 15 Points
- Two links to the specific merge commits are provided with submission.
- The commit has two parents.
- The commit has the message “Resolved conflict”.
- The resolving commit was pushed by YOU (i.e. each of you needs to resolve a conflict to receive marks for their submission).