Git Process
I. Branches:
Develop branch: DEVELOP
Production branch: PRODUCTION
Test branch: TEST
Feature branches: feature/{jira-feature-ticket-id-number-only}
Bug branches: fix/{jira-feature-ticket-id-number-only}
II. Developing Process:
Step 1: Get assigned to a task (a Jira ticket)
Step 2: Clarify the requirements with team leader
Step 3: Make sure your local DEVELOP branch up-to-date with the original one.
1 git pull origin DEVELOP
Step 4: Checkout a new feature branch named feature/{jira-feature-ticket-id-number-only} from the DEVELOP branch.
Step 5: Develop, commit the code changes, test in “localhost” environment.
Step 6:
Make sure your feature branch contain the latest code in DEVELOP branch.
1 git pull origin DEVELOP
2 git rebase DEVELOP
3
4 or
5
6 git rebase origin/DEVELOP
Push your code to the remote feature branch. Commit convention:
1 [TPCS-xxx] Write commit message
2
3 - Details 1
4 - Details 2
5 ...
Step 7: Announce the team leader to review your code in the remote feature branch.
Step 8: Follow below commands to merge the feature branch into TEST
Make sure your feature branch contain the latest code in DEVELOP branch.
1 git pull origin DEVELOP
2 git rebase DEVELOP
3
4 or
5
6 git rebase origin/DEVELOP
7
8 then,
9
10 git push -f origin feature/{jira-feature-ticket-id-number-only}
Merge your branch into TEST
1 git checkout TEST
2 git pull origin TEST
3 git merge feature/{ticket-id}
4 git commit -m "[{ticket-id}] What did you do to the current ticket"
5 git push origin TEST
Step 9: Follow Jira Process to let testers follow up
Step 10:
If testing results are successful, creates another pull-request to merge the feature branch to DEVELOP.
Else, continue develop on the current feature branch (back to step 5)
Step 11: At a stable point, the team leader merge the DEVELOP branch into the PRODUCTION branch and deploy with a tag version.