CompSci 308
Spring 2023
Advanced Software Design and Implementation

GIT Workflow for Teams

The following workflow is suggested for your team projects to minimize merge conflicts. It is based on using one branch per person in the team and using Gitlab's Merge Request to share each person's changes with the team. Note, Merge Requests can also be an valuable tool to help team mates review and communicate about each other's code.

Clone the Project Repository

For team projects, each person should clone the team repository directly so that everyone is working on the same code base (there should be no reason to fork your own copy).

One Branch per Person

The advantage of using one branch per person (instead per feature or package) is that it essentially assures that you are the only one using your branch, meaning you will only need to push your changes regularly so they are available in Gitlab and can be integrated into the master branch and you will not need to pull any new changes.

Integrate Your Changes with the Team

Merge Requests are a powerful tool provided by many online GIT repositories (including GitHub and BitBucket). It creates a web page representing the changes you intend to make to the repository in an easy to understand format that allows others to comment on your changes before accepting them. The request's web page also updates automatically to reflect new changes that are committed and pushed until it is closed.

Integrate the Team's Changes with Your Code

This step is most likely to contain merge conflicts since you have been coding on your branch without worrying about what the rest of the team has been doing (so the longer you wait to push your code the more likely it is that you will cause conflicts).