<?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: Antonio Pastorino</title>
    <description>The latest articles on DEV Community by Antonio Pastorino (@andou).</description>
    <link>https://dev.to/andou</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%2F634703%2F632d1b11-3554-4e20-80df-b2071f320b6f.jpeg</url>
      <title>DEV Community: Antonio Pastorino</title>
      <link>https://dev.to/andou</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/andou"/>
    <language>en</language>
    <item>
      <title>YAGBW - Yet Another Git Branching Workflow</title>
      <dc:creator>Antonio Pastorino</dc:creator>
      <pubDate>Fri, 02 Jul 2021 15:50:20 +0000</pubDate>
      <link>https://dev.to/andou/yagbw-yet-another-git-branching-workflow-hf4</link>
      <guid>https://dev.to/andou/yagbw-yet-another-git-branching-workflow-hf4</guid>
      <description>&lt;p&gt;Hey guys! &lt;a href="https://github.com/andou"&gt;Andou&lt;/a&gt; here, backend engineer / web developer / tech leader for &lt;a href="https://www.bitmama.it/"&gt;Bitmama Reply&lt;/a&gt;, an Italian web agency headquartered in Milan, Turin and London. &lt;/p&gt;

&lt;p&gt;In this article I would like to talk to you about &lt;strong&gt;YAGBW - Yet Another Git Branching Workflow&lt;/strong&gt;, the git branching workflow we usually work with.&lt;/p&gt;

&lt;p&gt;Let's get started!&lt;/p&gt;

&lt;h2&gt;
  
  
  Intro: branching workflows
&lt;/h2&gt;

&lt;p&gt;When you decide to version control your project (and you should do) using git, you are somewhat asked to choose a branching model or workflow.&lt;/p&gt;

&lt;p&gt;I've listed the most common workflows in my &lt;a href="https://github.com/andou/tech-resources#branching-models"&gt;tech resources list&lt;/a&gt;, which are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://nvie.com/posts/a-successful-git-branching-model/"&gt;Git Flow&lt;/a&gt; : Probably the most famous branching model&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://guides.github.com/introduction/flow/"&gt;GitHub Flow&lt;/a&gt; : My favourite branching model, good for CI/CD&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://trunkbaseddevelopment.com/"&gt;Trunk Based Development&lt;/a&gt; : A skinny model good for initial project phases&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  YAGBW / Basics
&lt;/h2&gt;

&lt;p&gt;Well, without further ado, here is the branching workflow we usually adopt to handle our web projects with minor headaches and a pretty full control over delivered features.&lt;/p&gt;

&lt;p&gt;This is a solution somewhere between Git Flow and GitHub Flow.&lt;/p&gt;

&lt;p&gt;Basic rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You shall create a &lt;code&gt;master&lt;/code&gt; (or &lt;code&gt;main&lt;/code&gt;) branch and a &lt;code&gt;cert&lt;/code&gt; branch&lt;/li&gt;
&lt;li&gt;You shall never push commits on &lt;code&gt;master&lt;/code&gt; (or &lt;code&gt;main&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;You shall never push commits on &lt;code&gt;cert&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;You shall never merge &lt;code&gt;cert&lt;/code&gt; on &lt;code&gt;master&lt;/code&gt; (or &lt;code&gt;main&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Developing stuff:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every feature or bug resolution needs a specific branch, that we can refer to as &lt;em&gt;feature branches&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;feature branches&lt;/em&gt; need a speaking name, usually &lt;code&gt;feature/&amp;lt;name&amp;gt;&lt;/code&gt; for a feature and &lt;code&gt;hotfix/&amp;lt;name&amp;gt;&lt;/code&gt; for a bug resolution&lt;/li&gt;
&lt;li&gt;You'll always create new &lt;em&gt;feature branches&lt;/em&gt; from &lt;code&gt;master&lt;/code&gt; (or &lt;code&gt;main&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;When you are done with your work on the &lt;em&gt;feature branch&lt;/em&gt; you shall first merge it on &lt;code&gt;cert&lt;/code&gt; to have it tested&lt;/li&gt;
&lt;li&gt;When your &lt;em&gt;feature branch&lt;/em&gt; has been tested, your could merge it in &lt;code&gt;master&lt;/code&gt; (or &lt;code&gt;main&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Merge &lt;code&gt;master&lt;/code&gt; (or &lt;code&gt;main&lt;/code&gt;) in your feature branch on a regular basis
.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Deploying stuff (assuming you have at least a &lt;strong&gt;production&lt;/strong&gt; and a &lt;strong&gt;certification&lt;/strong&gt; environment):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cert&lt;/code&gt; could be deployed at any given time on your &lt;strong&gt;certification&lt;/strong&gt; environment&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;master&lt;/code&gt; (or &lt;code&gt;main&lt;/code&gt;) could be deployed at any given time on your &lt;strong&gt;production&lt;/strong&gt; environment&lt;/li&gt;
&lt;li&gt;merge &lt;em&gt;feature branche&lt;/em&gt; on &lt;code&gt;cert&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;deploy your &lt;strong&gt;certification&lt;/strong&gt; environment&lt;/li&gt;
&lt;li&gt;test&lt;/li&gt;
&lt;li&gt;merge &lt;em&gt;feature branch&lt;/em&gt; on &lt;code&gt;master&lt;/code&gt; (or &lt;code&gt;main&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;deploy your &lt;strong&gt;production&lt;/strong&gt; environment&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  YAGBW / Addons
&lt;/h2&gt;

&lt;p&gt;Of course the above workflow should perform well or not given the nature of the project you use it with. You may find yourself comfortable with some addons on the process:&lt;/p&gt;

&lt;h3&gt;
  
  
  Addon #1 / The prelive phase mode
&lt;/h3&gt;

&lt;p&gt;Speaking of web projects there's always an initial phase where you are not online with your project and the word CI/CD makes no sense at all.&lt;br&gt;
During this phase you may consider to merge and test directly on &lt;code&gt;master&lt;/code&gt; (or &lt;code&gt;main&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Addon #2 / Consider adding pull requests
&lt;/h3&gt;

&lt;p&gt;You may find yourself comfortable introducing PRs to merge &lt;em&gt;feature branches&lt;/em&gt; on &lt;code&gt;cert&lt;/code&gt; and on &lt;code&gt;master&lt;/code&gt; (or &lt;code&gt;main&lt;/code&gt;). It's up to you, but it may helps to control your flow.&lt;/p&gt;

&lt;h3&gt;
  
  
  Addon #3 / Use tags
&lt;/h3&gt;

&lt;p&gt;Well, this is not really an addon because I strongly recommend it. Consider to make an annotated TAG for every merge on &lt;code&gt;cert&lt;/code&gt; and on &lt;code&gt;master&lt;/code&gt; (or &lt;code&gt;main&lt;/code&gt;). &lt;br&gt;
This really helps with rollbacks. &lt;/p&gt;

&lt;p&gt;Remember you can always detach a new branch from a previous tag (&lt;code&gt;git checkout -b newbranch yourtag&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap up
&lt;/h2&gt;

&lt;p&gt;That's all for today. I hope this has been an helpful read. Please comment with your suggestions and feedback. Also, let me know what you think about our branching workflow and if you have some other addons we should consider introducing.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>workflow</category>
      <category>devops</category>
    </item>
    <item>
      <title>Looking for contributors for my curated list of tech resources </title>
      <dc:creator>Antonio Pastorino</dc:creator>
      <pubDate>Thu, 01 Jul 2021 19:38:09 +0000</pubDate>
      <link>https://dev.to/andou/looking-for-contributors-for-my-curated-list-of-tech-resources-f71</link>
      <guid>https://dev.to/andou/looking-for-contributors-for-my-curated-list-of-tech-resources-f71</guid>
      <description>&lt;p&gt;Hi awesome community, Andou here.&lt;/p&gt;

&lt;p&gt;At &lt;a href="https://github.com/andou/tech-resources"&gt;https://github.com/andou/tech-resources&lt;/a&gt; you can find my curated list of useful tech resources for web developers and tech enthusiasts.&lt;/p&gt;

&lt;p&gt;I've a strong backend background, so my list is somewhat lack of frontend references and links, as you can see :)&lt;/p&gt;

&lt;p&gt;So, please, check out the list, give it a star if you like it and do not hesitate to contribute with a PR. Any help, frontend-wise expecially, would be appreciated!&lt;/p&gt;

&lt;p&gt;Enjoy! &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>devops</category>
      <category>git</category>
      <category>bash</category>
    </item>
    <item>
      <title>My list of resources for web dev and tech enthusiasts.</title>
      <dc:creator>Antonio Pastorino</dc:creator>
      <pubDate>Wed, 23 Jun 2021 16:23:46 +0000</pubDate>
      <link>https://dev.to/andou/my-list-of-resource-for-web-dev-and-tech-enthusiasts-5h4i</link>
      <guid>https://dev.to/andou/my-list-of-resource-for-web-dev-and-tech-enthusiasts-5h4i</guid>
      <description>&lt;p&gt;At &lt;a href="https://github.com/andou/tech-resources"&gt;https://github.com/andou/tech-resources&lt;/a&gt; you can find my curated list of useful tech resources for web developers and tech enthusiasts.&lt;/p&gt;

&lt;p&gt;Enjoy it 😄 and give it a ⭐!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>git</category>
      <category>bash</category>
      <category>shell</category>
    </item>
  </channel>
</rss>
