This documentation will show the git standard workflow for medium sized to big tech companies.
When working with a system that would be use by thousands of users every second it would be best to separate the backend and frontend system.
PHP Laravel API - for the backend
React JS - for the front end
After Cloning the specific repository, Branch out always to
master/main branch to avoid deprecated version.
Sample Git workflow:
git checkout master
Make sure master is up to date:
Checkout feature branch:
git checkout feature/V1-1/create-user-roles
Branch name must based on the task you will develop, if it’s a Feature, Fix or Bug.
Also add to the Jira ticket number if available.
You can use slash for separator.
Example Branch name:
[Feature, HotFix, Bug]/JIRA Ticket Number/task description
Git commit messages: Make useful and readable message when commit the branch.
And also add Jira ticket when making messages.
[Jira Ticket Number] [Feature, Bug, Fix] : commit messages
[V1-1] feature: adding user roles migratons
This is a very useful convention when integrating with Jira and Github.
Push the new branch
git push --set-upstream origin develop feature/V1-1/create-user-roles
Merge/Pull request: Always request to the develop branch only, to avoid issues on the
The tech lead or tech manager will be the one to merge and combine the pull requests.
Always check carefully your Jira ticket number when creating and commit branch.
This will help the team to add changelog to Jira task from Github commit.
When you are currently working on a task and need to update the
master branch without deleting your progress or messing up the codes you can do a
Update the master/main branch
git pull origin master
Bring your changes back
git stash pop
All task from the Sprint will be merged to the
develop branch once it’s already done from code review/checking
Develop Branch must be compared to the
main/master Branch if there’s any conflicts and Behind/Ahead commits.
Merge Develop branch to master branch once it already clean from any conflicts.
Make semantic number from the master branch to create a
Sample Tags Versioning
userapi - V1
userchatapi - V2
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- PATCH version when you make backwards compatible bug fixes.
Semantic versioning is very useful for the deployment process when it comes to Production servers, You can easily
rollback specific version from the clean version when the installed version is buggy.