<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammad Hari</title>
    <description>The latest articles on DEV Community by Muhammad Hari (@muhammadhari).</description>
    <link>https://dev.to/muhammadhari</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F453468%2F90db3358-608b-4a26-88d4-cf5890da6cc0.png</url>
      <title>DEV Community: Muhammad Hari</title>
      <link>https://dev.to/muhammadhari</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammadhari"/>
    <language>en</language>
    <item>
      <title>A better way to Git Commit</title>
      <dc:creator>Muhammad Hari</dc:creator>
      <pubDate>Sun, 04 Apr 2021 09:23:56 +0000</pubDate>
      <link>https://dev.to/muhammadhari/git-commit-message-pattern-5d6c</link>
      <guid>https://dev.to/muhammadhari/git-commit-message-pattern-5d6c</guid>
      <description>&lt;h2&gt;
  
  
  What's Git?
&lt;/h2&gt;

&lt;p&gt;As described on the official website, Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. &lt;a href="https://git-scm.com/"&gt;git-scm.com&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Git Commit
&lt;/h3&gt;

&lt;p&gt;The "commit" is a command in git, it's used to save your changes to the local repository and captures a snapshot of the project's current stages changes. Committed snapshots can be thought of as "safe" version of a project, Git will never change them unless you explicitly ask it to.&lt;/p&gt;

&lt;p&gt;The commit message should be structured as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;type&amp;gt;(&amp;lt;scope&amp;gt;): &amp;lt;subject&amp;gt;

&amp;lt;body&amp;gt;

&amp;lt;footer&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  message &lt;code&gt;&amp;lt;subject&amp;gt;&lt;/code&gt;:
&lt;/h5&gt;

&lt;p&gt;First-line cannot be longer than 70 characters, the second line is always blank and other lines should be wrapped at 80 characters.&lt;/p&gt;

&lt;h5&gt;
  
  
  message &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;uses the imperative, present tense: &lt;code&gt;change&lt;/code&gt; not &lt;code&gt;changed&lt;/code&gt; nor &lt;code&gt;changes&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;includes motivation for the change and contrasts with previous behavior.&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  message &lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt;:
&lt;/h5&gt;

&lt;p&gt;Closed issues should be listed on a separate line in the footer prefixed with "Closes" keyword like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Closes #101
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or in case of multiple issues:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Closes #101, #102, #103
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  &lt;code&gt;&amp;lt;type&amp;gt;&lt;/code&gt; values:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;feat&lt;/strong&gt; (new feature).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;fix&lt;/strong&gt; (bug fix).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;docs&lt;/strong&gt; (changes to documentation).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;style&lt;/strong&gt; (formatting, missing semicolons, etc; no code change).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;refactor&lt;/strong&gt; (refactoring production code).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;test&lt;/strong&gt; (adding missing tests, refactoring tests; no production code change).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;chore&lt;/strong&gt; (updating grunt tasks etc; no production code change).&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  &lt;code&gt;&amp;lt;scope&amp;gt;&lt;/code&gt; values:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;init&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;runner&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;watcher&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;config&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;web-server&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;proxy&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;etc&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;The &lt;code&gt;&amp;lt;scope&amp;gt;&lt;/code&gt; can be empty (eg. if the change is a global or difficult to assign to a single component), in which case the parentheses are omitted.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Breaking changes
&lt;/h4&gt;

&lt;p&gt;All breaking changes have to be mentioned in footer with the description of the change, justification and migration notes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BREAKING CHANGE:
`port-runner` command line option has changed to `runner-port`, so that it is
consistent with the configuration file syntax.

To migrate your project, change all the commands, where you use `--port-runner`
to `--runner-port`.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Source from:&lt;br&gt;
&lt;a href="https://karma-runner.github.io/0.10/dev/git-commit-msg.html"&gt;Karma&lt;/a&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
    </item>
  </channel>
</rss>
