<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hüsam on Medium]]></title>
        <description><![CDATA[Stories by Hüsam on Medium]]></description>
        <link>https://medium.com/@husamahmud?source=rss-c43ea649f8a5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RC0W3U3GAOTo3nprvHG-kw.jpeg</url>
            <title>Stories by Hüsam on Medium</title>
            <link>https://medium.com/@husamahmud?source=rss-c43ea649f8a5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 22:21:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@husamahmud/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[GitHub Workflow (as a Pro)]]></title>
            <link>https://medium.com/@husamahmud/github-workflow-as-pro-6decf326f871?source=rss-c43ea649f8a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6decf326f871</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[workflow]]></category>
            <dc:creator><![CDATA[Hüsam]]></dc:creator>
            <pubDate>Sun, 01 Sep 2024 20:55:31 GMT</pubDate>
            <atom:updated>2024-09-02T15:36:08.994Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>GitHub Workflow (as a Pro)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zafJlaXvnr87ayNOMhDTbQ.jpeg" /></figure><h4>Table of Contents:</h4><ul><li>Issues</li><li>Branches</li><li>Commits</li><li>Pull Requests</li><li>Code Review</li><li>Merging</li></ul><p>Working in a team requires an organized workflow to manage the codebase<br>efficiently, making it easier to review code and resolve conflicts. Let’s<br>explore the key points in the GitHub workflow, a topic I’m passionate about<br>because I love keeping things organized.</p><h4>Issues</h4><p>There’s no single right way to divide tasks into issues; it usually starts with<br>team agreement. The GitHub workflow typically begins by creating an issue to assign tasks.</p><p>Imagine we have three tasks for our application: fixing the existing auth flow, improving the login page styling, and creating an admin dashboard. The issues might look like this:</p><pre>[FIX]: Fix auth flow<br>[STYLE]: Improve login page styling<br>[FEATURE]: Implement admin dashboard</pre><p>You can also break down issues into subtasks, such as:</p><pre>[FEATURE]: Implement admin dashboard<br><br>[SUB-FEAT]: Implement dashboard UI<br>[SUB-FEAT]: Implement dashboard APIs</pre><p>Generally, the issue naming convention follows this format:</p><pre>[&lt;type&gt;]: &lt;short-description&gt;</pre><h4>Branches</h4><p>After creating an issue, the next step is to start coding by creating a branch<br>separate from the main branch. This separation ensures that any errors during development won’t affect the production environment.</p><p>GitHub offers a feature that allows you to link an issue to a branch. This means that when the branch work is completed and the pull request is merged, the issue is automatically closed. To create a branch, navigate to the issue page, find the “Development” section on the right, and click “Create a branch.”</p><p>When naming a branch, it’s good practice to include the issue number. For<br>example:</p><pre>For `[FIX]: Fix auth flow`, the branch name could be `fix/&lt;issue-number&gt;/fix_auth_flow`.<br>For `[STYLE]: Improve login page styling`, it might be `style/&lt;issue-number&gt;/improve_login_page_styling`.<br>For `[FEATURE]: Implement admin dashboard`, use `feature/&lt;issue-number&gt;/implement_dashboard`.</pre><p>The general format for branch naming is:</p><pre>&lt;type&gt;/&lt;issue-number&gt;/&lt;short-description&gt;</pre><h4>Commits</h4><p>Here are some tips for committing your changes:</p><ul><li>Commit frequently rather than waiting until all work is done.</li><li>Write clear, descriptive commit messages that explain what you did.</li><li>Use the present tense, such as “add,” “fix,” or “update.”</li><li>Use the imperative mood, like “add” instead of “added.”</li><li>Keep the message under 50 characters if possible.</li></ul><p>Now, let’s consider some example commit messages for our tasks:</p><pre>feat: implement dashboard header<br>feat: implement dashboard main content<br>style: add dashboard styling<br>fix: fix dashboard data fetching<br>enhance: add dashboard animations<br>refactor: improve dashboard API implementation<br>docs: add API documentation for dashboard</pre><p>If you’re working in a mono repo (where frontend and backend code are in the same repository), you might use messages like:</p><pre>feat(front): implement dashboard header<br>feat(back): implement dashboard APIs<br>style(front): add dashboard styling<br>fix(back): fix dashboard data fetching<br>enhance(front): add dashboard animations<br>refactor(back): improve dashboard API readability<br>docs(front): add API documentation for dashboard</pre><p>The commit message format is:</p><pre>[&lt;type&gt;]: &lt;short-description&gt;</pre><h4>Pull Requests</h4><p>After committing your changes, push them to the remote branch and create a Pull Request (PR) to merge your changes with the main branch.</p><ul><li>To create a PR, navigate to the branch page and click “Create a Pull Request.”</li><li>You’ll need to provide a title and description for the PR, and you can link it.</li><li>to an issue or assign it to a reviewer. You can also add labels, such as `bug`, `feature`, or `enhancement`</li></ul><p>Name your PR in a way that reflects the branch name but without the issue number. For example:</p><pre>For `style/&lt;issue-number&gt;/improve_login_page_styling`, the PR might be `style/improve-login-page-styling`.<br>For `feature/&lt;issue-number&gt;/implement_dashboard`, it might be `feature/implement-dashboard`.</pre><p>The format for PR naming is:</p><pre>&lt;type&gt;/&lt;short-description&gt; (use kebab-case for the short description)<br><br>OR<br><br>&lt;type&gt;/&lt;scope&gt;/&lt;short-description&gt;</pre><blockquote>NOTE<br>It’s perfectly fine to use the branch name as the PR title. No problem at all.</blockquote><h4>Code Review</h4><p>Code review is a critical step before merging your code into the main branch. It ensures that the code is clean, follows best practices, and doesn’t introduce bugs or performance issues. After creating a PR, assign it to someone experienced in the codebase, ideally a senior developer.</p><p>Having two reviewers for each PR is recommended, as it helps catch more issues and promotes knowledge sharing among team members.</p><h4>Merging</h4><p>The final step in the GitHub workflow is merging the PR into the main branch. After the PR is approved and merged, the associated issue will be automatically closed. Don’t forget to delete the branch after merging to keep the repository clean.</p><p>Once the code is in the main branch, it’s ready for production, and the changes will be visible to users. The team can then celebrate another successful collaboration!</p><h4>Recap</h4><p>Let’s quickly recap the main points in the GitHub workflow:</p><ol><li>Create an Issue<br>Name it like `[&lt;type&gt;]: &lt;short-description&gt;` (`[FIX]: Fix auth flow`).</li><li>Create a Branch<br>Name it like `&lt;type&gt;/&lt;issue-number&gt;/&lt;short-description&gt;` (`fix/92/fix_auth_flow`).</li><li>Commit Your Changes<br>Use concise, descriptive messages (`feat: implement dashboard header`).</li><li>Create a Pull Request<br>Use a clear title that reflects the branch name (`feature/implement-dashboard`).</li><li>Code Review<br>Assign one or two reviewers to check the code before merging.</li><li>Merge and Clean Up<br>Merge the PR, close the issue, and delete the branch.</li></ol><h4><strong>Types</strong></h4><p>can include `feat`, `style`, `fix`, `enhance`, `refactor`, `docs`</p><h4>Scopes</h4><p>can be `front`, `back`, `api`, `db`, `docs`, `test`, `chore`</p><h4>Tools</h4><p>You can use a Git hook called <a href="https://pre-commit.com/">pre-commit</a> to enforce the commit message format.</p><p>This workflow might seem like a lot initially, but with practice, it will become second nature. I hope this article was helpful and that you learned something new today. Thank you for reading, and have a great day! :)</p><p>By the way, I’m considering writing an article about GitHub Actions next. What do you think?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6decf326f871" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>