<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>commit-msg Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/commit-msg/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/commit-msg/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:07:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Enforce the JIRA issue id in a GIT commit message</title>
		<link>https://www.scmgalaxy.com/tutorials/enforce-the-jira-issue-id-in-a-git-commit-message/</link>
					<comments>https://www.scmgalaxy.com/tutorials/enforce-the-jira-issue-id-in-a-git-commit-message/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 22 Aug 2018 14:21:59 +0000</pubDate>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[commit-msg]]></category>
		<category><![CDATA[Gerrit]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[Jira]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5249</guid>

					<description><![CDATA[<p>Enforce the JIRA issue id in a GIT commit message This can be done by using git hooks file location [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/enforce-the-jira-issue-id-in-a-git-commit-message/">Enforce the JIRA issue id in a GIT commit message</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-5258" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/08/jira-git.png" alt="" width="600" height="350" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/08/jira-git.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/08/jira-git-300x175.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p>Enforce the JIRA issue id in a GIT commit message</p>
<p><strong>This can be done by using git hooks file location at .git/hooks/commit-msg</strong>. Following are the 2 way in whcih each Developers can set the Hooks in their developement envioronment.</p>
<p><strong>Method &#8211; 1</strong></p>
<pre class="brush: plain; title: ; notranslate"># 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 &quot;.git/hooks/commit-msg&quot;.
# Make sure to add execution permissions to the file.

export MESSAGE=$(&lt;$1)
export JIRA_ISSUE_TAG='ISSUETAG-(&#x5B;0-9]*)'

if &#x5B;&#x5B; $MESSAGE =~ $JIRA_ISSUE_TAG ]]; then
echo -e &quot;\e&#x5B;32mGreat, your commit message contains a JIRA issue!\e&#x5B;0m&quot;
exit 0;
fi

echo -e &quot;\e&#x5B;31mOh hamburgers ... You forgot to add a JIRA issue number!\e&#x5B;0m&quot;;
exit 1;

</pre>
<p><strong>Method 2 &#8211;</strong> 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</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/enforce-the-jira-issue-id-in-a-git-commit-message/">Enforce the JIRA issue id in a GIT commit message</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/enforce-the-jira-issue-id-in-a-git-commit-message/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
