MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Enforce the JIRA issue id in a GIT commit message

Banner with JIRA and Git logos titled Enforce the JIRA issue id in a GIT commit message

Enforce the JIRA issue id in a GIT commit message

This can be done by using git hooks file location at .git/hooks/commit-msg. Following are the 2 way in whcih each Developers can set the Hooks in their developement envioronment.

Method – 1

[code]# commit-msg.sh
#!/bin/sh
# This hook will make sure that the commit message contains a JIRA issue.
#
# To enable this hook, rename this file to “.git/hooks/commit-msg”.
# Make sure to add execution permissions to the file.

export MESSAGE=$(<$1)
export JIRA_ISSUE_TAG=’ISSUETAG-([0-9]*)’

if [[ $MESSAGE =~ $JIRA_ISSUE_TAG ]]; then
echo -e “\e[32mGreat, your commit message contains a JIRA issue!\e[0m”
exit 0;
fi

echo -e “\e[31mOh hamburgers … You forgot to add a JIRA issue number!\e[0m”;
exit 1;

[/code]

Method 2 – This is another very good example to implement to force jira id in each commit message. http://nsbogan.com/tools/2015/06/04/jira-id-in-git-commit-messages

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Git Lab Exercise & Assignment: Git cherry-pick: Part – 12

git cherry-pick copies one or more existing commits from another branch and applies them as new commits on your current branch. This lab corrects and completes the…

Read More

Git Lab Exercise & Assignment: Changing History with Amend: Part – 5

This lab covers three ways to rewrite local Git history: fixing the last commit with git commit –amend, reordering commits with git rebase -i, and undoing it…

Read More

How to Configure pre-commit for Terraform: Complete DevOps Guide with 15 Practical Use Cases, Commands, Security Checks, and Best Practices

Terraform pre-commit Hooks: Installation, Configuration, TFLint, Trivy, Checkov & CI/CD Guide Learn to configure pre-commit for Terraform with step-by-step commands, terraform fmt, validate, TFLint, Trivy, Checkov, terraform-docs,…

Read More

How to Install and Configure pre-commit on macOS, Windows, and Linux: Complete Step-by-Step Guide

SEO Title: How to Install and Configure pre-commit on Mac, Windows & Linux (2026) Meta Description: Learn how to install and configure pre-commit Git hooks on macOS,…

Read More

Git, GitHub, and GitLab Interview Questions: Practical Answers and Command Guide

A practical interview-prep guide covering core Git concepts, essential commands, and common GitHub/GitLab questions. Includes workflow diagrams, comparisons, and troubleshooting checklists.

Read More

Git Training Roadmap: Practical Curriculum, Labs, and Team Workflow

A modern, hands-on Git training blueprint for DevOps and engineering teams. Use this curriculum, workflow, and command labs to build real-world Git skills quickly.

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x