<?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: couchcamote</title>
    <description>The latest articles on DEV Community by couchcamote (@couchcamote).</description>
    <link>https://dev.to/couchcamote</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%2F231214%2F45e49d25-96f2-45cc-bf4d-009ce079b99f.png</url>
      <title>DEV Community: couchcamote</title>
      <link>https://dev.to/couchcamote</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/couchcamote"/>
    <language>en</language>
    <item>
      <title>Git Branch Naming Convention</title>
      <dc:creator>couchcamote</dc:creator>
      <pubDate>Tue, 31 Mar 2020 10:49:00 +0000</pubDate>
      <link>https://dev.to/couchcamote/git-branching-name-convention-cch</link>
      <guid>https://dev.to/couchcamote/git-branching-name-convention-cch</guid>
      <description>&lt;p&gt;Working on a big company with projects that could scale from a one-man team then suddenly to a 20 developers team, having a manageable code repository is a need. Most &lt;em&gt;Proof of Concept&lt;/em&gt; projects start with a repository with all changes being applied directly to the &lt;strong&gt;master&lt;/strong&gt; branch. Elevating one into a proper big scale repository is a common path being taken by new developers when their small-scale project is suddenly noticed.&lt;/p&gt;

&lt;p&gt;On my end, having to work on dozens of different projects like these, I came up with this branch naming convention.&lt;/p&gt;

&lt;p&gt;I separated these branches into two categories:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Flow Branches&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These branches which we expect to be permanently available on the repository follow the flow of code changes starting from development until the production.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Development&lt;/strong&gt; (&lt;em&gt;dev&lt;/em&gt;)&lt;/p&gt;

&lt;p&gt;All new features and bug fixes should be brought to the development branch. Resolving developer codes conflicts should be done as early as here.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;QA/Test&lt;/strong&gt; (&lt;em&gt;test&lt;/em&gt;)&lt;/p&gt;

&lt;p&gt;Contains all codes ready for QA testing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Staging&lt;/strong&gt; (&lt;em&gt;staging&lt;/em&gt; , Optional)&lt;/p&gt;

&lt;p&gt;It contains tested features that the stakeholders wanted to be available either for a demo or a proposal before elevating into the production. Decisions are made here if a feature should be finally brought to the production code.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Master&lt;/strong&gt; (&lt;em&gt;master&lt;/em&gt;)&lt;/p&gt;

&lt;p&gt;The production branch, if the repository is published, this is the default branch being presented.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Except for Hotfixes, we want our codes to follow a one-way merge starting from development &amp;gt; test &amp;gt; staging &amp;gt; production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Temporary Branches&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As the name implies, these are disposable branches that can be created and deleted by need of the developer or deployer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Feature&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Any code changes for a new module or use case should be done on a feature branch. This branch is created based on the current development branch. When all changes are &lt;strong&gt;Done&lt;/strong&gt;, a Pull Request/Merge Request is needed to put all of these to the development branch.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;feature/integrate-swagger&lt;/li&gt;
&lt;li&gt;feature/JIRA-1234&lt;/li&gt;
&lt;li&gt;feature/JIRA-1234_support-dark-theme&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is recommended to use all lower caps letters and hyphen (-)  to separate words unless it is a specific item name or ID. Underscore (_) could be used to separate the ID and description.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Bug Fix&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the code changes made from the feature branch were rejected after a release, sprint or demo, any necessary fixes after that should be done on the bugfix branch.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;bugfix/more-gray-shades&lt;/li&gt;
&lt;li&gt;bugfix/JIRA-1444_gray-on-blur-fix&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Hot Fix&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If there is a need to fix a blocker, do a temporary patch, apply a critical framework or configuration change that should be handled immediately, it should be created as a Hotfix. It does not follow the scheduled integration of code and could be merged directly to the production branch, then on the development branch later.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;hotfix/disable-endpoint-zero-day-exploit&lt;/li&gt;
&lt;li&gt;hotfix/increase-scaling-threshold&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Experimental&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Any new feature or idea that is not part of a release or a sprint. A branch for playing around.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;experimental/dark-theme-support&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Build&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A branch specifically for creating specific build artifacts or for doing code coverage runs.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;build/jacoco-metric&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Release&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A branch for tagging a specific release version &lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;release/myapp-1.01.123&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Git also supports tagging a specific commit history of the repository. A release branch is used if there is a need to make the code available for checkout or use.&lt;/p&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Merging&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A temporary branch for resolving merge conflicts, usually between the latest development and a feature or Hotfix branch. This can also be used if two branches of a feature being worked on by multiple developers need to be merged, verified and finalized.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;merge/dev_lombok-refactoring&lt;/li&gt;
&lt;li&gt;merge/combined-device-support&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Any organization can come up with their own convention. This applies to my current Team's need and there could be a better approach which could improve upon these. What are your conventions on your own organization? &lt;/p&gt;

</description>
      <category>git</category>
      <category>branching</category>
      <category>name</category>
      <category>convention</category>
    </item>
  </channel>
</rss>
