Git Best Practices and Preferences

Yuvraj Patil
2 min readAug 26, 2024

--

Photo by Scott Graham on Unsplash

I have listed some best practices and preferences that I follow while working with Git.

General

  1. Git Forking should be used
  2. Every production release should have one Git Release.

Commits

  1. The Git commit message should be specific. Any new team member should get a good idea of commit from the commit message.
  2. 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

  1. The Git PR should have short but understandable details.
  2. The PR should have evidence of work. It should have before/after image/video.
  3. Every PR should have appropriate label (Prefer using label of release version)

Git Releases

  1. Git Release should have a proper tag. Ex. v1.0.2, v2.1.0 etc.
  2. Git Release should have four sections (as applicable): Breaking, Added, Changed, Fixed
  3. 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.
  4. 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.
  5. 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.
  6. 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.

--

--

Yuvraj Patil
Yuvraj Patil

Written by Yuvraj Patil

Riding the dragon in realm of React Native. Website: https://.www.yuvrajpatil.com