Git Best Practices and Preferences
2 min readAug 26, 2024
I have listed some best practices and preferences that I follow while working with Git.
General
- Git Forking should be used
- Every production release should have one Git Release.
Commits
- The Git commit message should be specific. Any new team member should get a good idea of commit from the commit message.
- The Git commit should be refixed with the Jira ticket ID. It helps in quicky opening the Jira ticket corresponding to the commit.
Code Review
- The Git PR should have short but understandable details.
- The PR should have evidence of work. It should have before/after image/video.
- Every PR should have appropriate label (Prefer using label of release version)
Git Releases
- Git Release should have a proper tag. Ex. v1.0.2, v2.1.0 etc.
- Git Release should have four sections (as applicable): Breaking, Added, Changed, Fixed
- Breaking section should list down all the changes who can break the existing app. Ex. React Native version upgrade, Using Kotlin instead of Java etc.
- Added section should list down all the new features added to the app Ex. New functionality, New screen, New confirmation popup on a screen etc.
- Changed section should list down all the existing things which whose behaviour/value got changed. Ex. Offline Message timeout got reduced to 30 seconds, API throttle time is increased to 10 seconds, Updated the verification message of Review Screen.
- Fixed section should list down all the issues which got fixed. Ex. Transaction filter not working when filtered with special characters, Incorrect local currancy name etc.