Git Development Flow (Branches and Merging)
Last Updated : February 3, 2023
Sprint Planning
In every Sprint Planning, we commit what we would like to achieve on that Sprint based on what we agreed upon with the team. Each Team Lead will provide support to define each Team Member’s Tasks and will be defined as a branch (or issue). the branch will then be reviewed by each Team Lead by using Merge Request and approved by them as marker for Lead Programmer to process the merge Merge Request.
Responsibility
Role | Merge | Approve | Create Merge Request | Create Branch | Create Issue |
---|---|---|---|---|---|
Lead Programmer | Yes | Yes | Yes | Yes | Yes |
Other Dept Lead | Yes | Yes | Yes | Yes | |
Senior Developer | Yes | Yes | Yes | Yes | |
Junior/Rookie Developer | Yes | Yes | Yes | ||
QA Team | Yes | Yes | |||
Management Team (PM/Producer) | Yes | ||||
Outside Development Team | Yes |
Create an Issue (Optional)
Issues can be created by QA Team as they report bugs or stakeholders (Product Manager, Tech Advisor, Producer, Team Lead) or also developers. Issue is used as backlog on Git for real issue list from QA — (link TBD)
Refer to this page:
Create Merge Request
From Issue (Optional)
If you are assigned to an issue and would like to work on that, follow these steps:
-
Go to the issue detail
%2026985454b50b4d1aad65369d97dc50e0/Untitled.png)
-
Click the dropdown arrow on Create merge request,
%2026985454b50b4d1aad65369d97dc50e0/Untitled%201.png)
- Checklist “Create merge request and branch
- Add the branch prefix on the branch name
- For new feature and feature adjustment:
- feature/{merge-request-name}
- For bugfix:
- bugfix/{merge-request-name}
- For just testing:
- test/{branch-name}
- For new feature and feature adjustment:
- Set Source branch to which branch you want to work from (set develop by default)
- wait a while for GitLab to check the name, and then click Create merge request.
-
GitLab will then create the branch for you
%2026985454b50b4d1aad65369d97dc50e0/Untitled%202.png)
-
Open your Git Application (SourceTree is recommended)
-
Fetch new updated branches from Gitlab remote
-
Checkout the created branch from merge request to your local computer, so you can work on it.
From Creating Your Own Branch
You can also create your own branch yourself without creating issue first if you want by following this requirement
Creating your Branch
-
Open your Git Application (SourceTree is recommended)
-
Change your active branch to develop
-
Fetch new updated branches from Gitlab remote
-
If there’s new update for develop branch (check screenshot below), Pull new update on develop branch from remote
%2026985454b50b4d1aad65369d97dc50e0/Untitled%203.png)
-
If everything is good, now create your branch from develop
%2026985454b50b4d1aad65369d97dc50e0/Untitled%204.png)
- For new feature and feature adjustment:
- feature/{branch-name}
- For bugfix:
- bugfix/{branch-name}
- For just testing:
- test/{branch-name}
- For design update:
- design/{branch-name}
- For art update:
- art/{branch-name}
- For new feature and feature adjustment:
Creating merge request
-
Create merge request in Gitlab
%2026985454b50b4d1aad65369d97dc50e0/Untitled%205.png)
-
Select your source branch and make sure target branch is develop
%2026985454b50b4d1aad65369d97dc50e0/Untitled%206.png)
-
Now you can work on your branch
Work on your Issue
- Make sure you check out the branch you created using merge request
- You can do your experiment if needed in this branch, just make sure you don’t just commit the changes you made with other people files
- You can use comment on both merge request and issue to ask for guidance by summoning people with mention
- You are allowed to merge from other feature branch and develop branch if needed, but you still need start from latest develop branch when creating your branch
- Follow the Commit guideline here : Git Commit Guideline
Mark Merge Request as Ready
-
If you have done your work there are some steps before you make your request ready, since your issue is not the only issue being worked on, the develop branch might gets updated while you work, so you need to
-
Commit your last changes (don’t forget)
-
Change Branch to develop
-
Pull latest update from develop branch
-
Merge develop to your branch
-
Check if your branch have an error or conflict with current develop branch
-
If Merge Conflict happened then ask Lead Programmer for guidance if necessary
-
-
Now open your merge request again
%2026985454b50b4d1aad65369d97dc50e0/Untitled%207.png)
-
Set Reviewer with your Team Lead or your specific reviewer for your issue
-
Click on Mark as Ready
Review Merge Request
- Now your Team Lead will review your work
- Team Lead can use Merge Request to review changes or by opening the branch
- if the work is good enough for merging, Team Lead will approve the merge request and change reviewer to Lead Programmer
- if the work needs review, Team Lead will add revision thread on merge request and will remove him/her self from review and also
- the branch then continue being worked on by assignee (assignee then can change back to draft if many changes needed)
Merge the Request
- [OPTIONAL] Now the Lead Programmer will review the work
- Lead Programmer will open the branch and check its changes
- After it is approved, Lead Programmer will merge the branch and the merge request will be automatically closed
- The issue then should be moved by QA Ready by Lead Programmer (DEPRECATED STEP)
QA Test and Closing the Issue (DEPRECATED)
-
QA will test it based on the guideline provided by issue description
-
If Issue persist QA will mark issue as QA Failed and then summon the assignee in comment section
-
The assignee then will move the issue back to its previous label and make merge request again to fix the issue
-
If the issue is not on what you worked on, you can ask Lead Programmer for guidance
-
-
If Issue is completed, the QA will move it to Closed Issue
Sprint Review
The issue will be marked as complete in Sprint Goals in Sprint Review and we can move on to next feature or bugfix in next Sprint