Git
Git is the well known version control tool through out the software development industry.
CI / CD
CI / CD stands for "Continuous integration" & "Continuous Deployment". Which mean we will be adding features and deploying those feature continuely.
Beacuse of this we sperated project enviroment by using git.
Every project will have three enviroment which is development, staging & production. Which can be divided to three branches dev, staging & prod.
Feature Development
Most of the time multiple features are developed at the same time. Beacuse the we need to create branches base on the feature we are working on.
Code Review
Inorder to make project healthy we need to make regular code review.
Branches
There are lots of git workflow out there. For our parther companies we use the following workflow which work for us.
main
Main branch is the branch which store the clean progress of the project. In main branch we keep only the commit which is necessary.
feature/<feature-name>
When working on feature we work on the feature branch.
prod
Commits in Production branch describes the production history. Production branch is connect to Production servers using CI / CD
staging
Commits in Staging branch describes the staging history. Staging branch is connect to Staging servers using CI / CD
Working on features
We have to rule for working on the feature which is "One developer for One feature".
But in some situation need to developed quickly. In those case dev teams can follow these approach
Divide the feature into sub features
When the feature is too big we can divided that feature into multiple sub features so the different devloper can work on it at the same time.
Pair Programming
Pair Programming is when two developer work on the a feature while sharing the single workstation.
Conventional Commit
Our commits need to readable & trackable. To do that we use conventional commit.
We follow some of the guideline from this page with some adjustment.
add
adding stuff in to the project.
remove
remove stuff in to the project.
update
update stuff in to the project.
Merging Branches
When working on feature we will be commiting lots of changes. Too many commit can make it harder for the developers to track the project changes.
Beacuse of this when ever we merge to another branch we have to create pull request with sqaush commit enabled. And confirm the commit when it is ready.