<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Workflow on Backend Engineering Strategy Tools</title><link>https://backend-engineering-strategy-tools.github.io/site/tags/workflow/</link><description>Recent content in Workflow on Backend Engineering Strategy Tools</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 01 Jan 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://backend-engineering-strategy-tools.github.io/site/tags/workflow/index.xml" rel="self" type="application/rss+xml"/><item><title>Git</title><link>https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/</link><pubDate>Mon, 01 Jan 2024 00:00:00 +0000</pubDate><guid>https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/</guid><description>&lt;p&gt;Git is the distributed version control system behind virtually all modern software development. Every clone is a full copy of the history — fast, local, and cryptographically integrity-checked.&lt;/p&gt;
&lt;h2 id="branches"&gt;Branches
&lt;/h2&gt;&lt;p&gt;Branches in Git are cheap: creating, merging, and deleting them is fast because a branch is just a pointer to a commit, not a copy of the files.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Branch visualization" class="gallery-image" data-flex-basis="300px" data-flex-grow="125" height="800" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/branches.png" srcset="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/branches_hu_e4c76f5ed2b21162.png 800w, https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/branches.png 1000w" width="1000"&gt;&lt;/p&gt;
&lt;p&gt;By convention, one branch is singled out and called &lt;code&gt;main&lt;/code&gt; (historically &lt;code&gt;master&lt;/code&gt;).&lt;/p&gt;
&lt;h2 id="workflows"&gt;Workflows
&lt;/h2&gt;&lt;p&gt;How teams structure collaboration varies. Three common models:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Benevolent dictator&lt;/strong&gt; — used by the Linux kernel. A hierarchy of trusted lieutenants, with one maintainer having final merge authority.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Benevolent dictator workflow" class="gallery-image" data-flex-basis="300px" data-flex-grow="125" height="800" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/benevolent-dictator.png" srcset="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/benevolent-dictator_hu_851cdc98802083b8.png 800w, https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/benevolent-dictator.png 1000w" width="1000"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Integration manager&lt;/strong&gt; — common in open source. Each contributor has their own public fork; a maintainer pulls from forks into a blessed repository.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Integration manager workflow" class="gallery-image" data-flex-basis="300px" data-flex-grow="125" height="800" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/integration-manager.png" srcset="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/integration-manager_hu_96ec310b098419c9.png 800w, https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/integration-manager.png 1000w" width="1000"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Shared repository&lt;/strong&gt; — the most common in companies. Everyone pushes to the same remote (&lt;code&gt;origin&lt;/code&gt;). All instances are equal; &lt;code&gt;origin&lt;/code&gt; is just a convention.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Shared repository workflow" class="gallery-image" data-flex-basis="300px" data-flex-grow="125" height="800" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/origin.png" srcset="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/origin_hu_a7d4a46c025d1eb0.png 800w, https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/origin.png 1000w" width="1000"&gt;&lt;/p&gt;
&lt;h2 id="data-integrity"&gt;Data integrity
&lt;/h2&gt;&lt;p&gt;Git&amp;rsquo;s data model uses SHA-1 checksums for every file and commit. This means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Every object is verified on checkout&lt;/li&gt;
&lt;li&gt;History cannot be silently altered — changing any commit changes all IDs after it&lt;/li&gt;
&lt;li&gt;You can&amp;rsquo;t push without first pulling (unless you force-push and overwrite)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="merge-vs-rebase"&gt;Merge vs rebase
&lt;/h2&gt;&lt;p&gt;Two ways to integrate branches:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Merge&lt;/strong&gt; preserves history exactly as it happened — a merge commit ties the two branches together.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Merge" class="gallery-image" data-flex-basis="300px" data-flex-grow="125" height="1280" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/merge.png" srcset="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/merge_hu_c092e3335dada9ad.png 800w, https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/merge.png 1600w" width="1600"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rebase&lt;/strong&gt; replays your commits on top of the target branch — produces a linear history but rewrites commit SHAs. Never rebase shared/public branches.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Rebase" class="gallery-image" data-flex-basis="320px" data-flex-grow="133" height="1200" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/rebase.png" srcset="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/rebase_hu_f2a9673967d0c053.png 800w, https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/rebase.png 1600w" width="1600"&gt;&lt;/p&gt;
&lt;h2 id="branch-strategies"&gt;Branch strategies
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Git Flow&lt;/strong&gt; — a structured model with &lt;code&gt;main&lt;/code&gt;, &lt;code&gt;develop&lt;/code&gt;, &lt;code&gt;feature/*&lt;/code&gt;, &lt;code&gt;release/*&lt;/code&gt;, and &lt;code&gt;hotfix/*&lt;/code&gt; branches. Good for software with versioned releases.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Git Flow" class="gallery-image" data-flex-basis="300px" data-flex-grow="125" height="2560" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/git-flow.png" srcset="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/git-flow_hu_42113a80f33ff450.png 800w, https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/git-flow_hu_62391bcd6d3d4fd5.png 1600w, https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/git-flow_hu_3b1fe4a5068ecdbe.png 2400w, https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/git-flow.png 3200w" width="3200"&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://nvie.com/posts/a-successful-git-branching-model/" target="_blank" rel="noopener"
 &gt;Git Flow original post&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;GitHub Flow / GitLab Flow&lt;/strong&gt; — simpler: branch from &lt;code&gt;main&lt;/code&gt;, open a pull request, merge when reviewed. Works well for continuously deployed web apps.&lt;/p&gt;
&lt;p&gt;&lt;img alt="GitHub/GitLab Flow" class="gallery-image" data-flex-basis="300px" data-flex-grow="125" height="1280" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/simple-git-flow.png" srcset="https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/simple-git-flow_hu_50e666e72ef5f524.png 800w, https://backend-engineering-strategy-tools.github.io/site/public-notes/cicd/git/simple-git-flow.png 1600w" width="1600"&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://guides.github.com/introduction/flow/" target="_blank" rel="noopener"
 &gt;GitHub Flow&lt;/a&gt; · &lt;a class="link" href="https://docs.gitlab.com/ee/topics/gitlab_flow.html" target="_blank" rel="noopener"
 &gt;GitLab Flow&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="which-strategy-fits"&gt;Which strategy fits
&lt;/h2&gt;&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Project type&lt;/th&gt;
 &lt;th&gt;Recommendation&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Library / SDK&lt;/td&gt;
 &lt;td&gt;Git Flow — versioned releases, may need to support multiple versions simultaneously&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Web application&lt;/td&gt;
 &lt;td&gt;GitHub Flow — continuously delivered, no need for release branches&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Client / installable app&lt;/td&gt;
 &lt;td&gt;Git Flow — users run specific versions you need to patch and maintain&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="advanced-features"&gt;Advanced Features
&lt;/h2&gt;&lt;h3 id="git-worktree"&gt;Git Worktree
&lt;/h3&gt;&lt;p&gt;&lt;code&gt;git worktree&lt;/code&gt; allows you to check out multiple branches of the same repository into separate directories simultaneously. This is particularly useful for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Working on multiple features or bug fixes in parallel without stashing changes.&lt;/li&gt;
&lt;li&gt;Quickly switching contexts for code reviews or testing different versions of your code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All worktrees share the same Git objects, minimizing disk space usage.&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://git-scm.com/docs" target="_blank" rel="noopener"
 &gt;git-scm.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://training.github.com/downloads/github-git-cheat-sheet/" target="_blank" rel="noopener"
 &gt;GitHub Git cheat sheet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://ndpsoftware.com/git-cheatsheet.html" target="_blank" rel="noopener"
 &gt;Interactive Git cheatsheet&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>