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

  1. Choose one person to create a new repository on GitHub;
  2. Once the repo is created, the owner should invite their partner as a Collaborator.
  3. 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.

  1. Both of you edit the same line of code;
  2. One of you should push your changes first (or you can race);
  3. The other partner will then have to pull code and resolve a merge conflict
  4. 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

  1. 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).
  2. 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).