aboutsummaryrefslogtreecommitdiff
path: root/public/i-was-wrong-about-git-workflows.html
diff options
context:
space:
mode:
authorMitja Felicijan <m@mitjafelicijan.com>2023-07-08 23:25:41 +0200
committerMitja Felicijan <m@mitjafelicijan.com>2023-07-08 23:25:41 +0200
commitcd6644ea4ddc78597934ab0ef5ba50e3c3daa927 (patch)
tree03de331a8db6386dfd6fa75155bfbcea6b4feaf3 /public/i-was-wrong-about-git-workflows.html
parent84ed124529ffeee1590295b8de3a8faf51848680 (diff)
downloadmitjafelicijan.com-cd6644ea4ddc78597934ab0ef5ba50e3c3daa927.tar.gz
Moved to a simpler SSG
Diffstat (limited to 'public/i-was-wrong-about-git-workflows.html')
-rwxr-xr-xpublic/i-was-wrong-about-git-workflows.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/public/i-was-wrong-about-git-workflows.html b/public/i-was-wrong-about-git-workflows.html
new file mode 100755
index 0000000..e71d60b
--- /dev/null
+++ b/public/i-was-wrong-about-git-workflows.html
@@ -0,0 +1,51 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8X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/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>I think I was completely wrong about Git workflows</title><meta name=description content="I have been using some approximation of GitFlow for years now and never reallyquestioned it to be honest."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
5<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>I think I was completely wrong about Git workflows</h1><p>May 23, 2023<div><p>I have been using some approximation of <a href=https://jeffkreeftmeijer.com/git-flow/>Git
7Flow</a> for years now and never really
8questioned it to be honest. When I create a repo I create develop branch and set
9it as default one and then merge to master from there. Seems reasonable enough.<p>One thing that I have learned is that long living branches are the devil. They
10always end up making a huge mess when they need to be merged eventually into
11master. So by that reason, what is the develop branch if not the longest living
12feature branch. And from my personal experience there was never a situation
13where I wasn’t sweating bullets when I had to merge develop back to master.<p>This realisation started to give me pause. So why the hell am I doing this, and
14is there a better way. Well the solution was always there. And it comes in a
15form of <a href=https://git-scm.com/book/en/v2/Git-Basics-Tagging>git tags</a>.<p>So what are git tags? Git tags are references to specific points in a Git
16repository's history. They are used to mark important milestones, such as
17releases or significant commits, making it easier to identify and access
18specific versions of a project.<p>Somehow we have all hijacked the meaning of the master branch that it has to be
19the most releasable version of code. And this is also where the confusing about
20versioning the software kicks in. Because master branch implicitly says that we
21are dealing with the rolling release type of a software. And by having a develop
22branch we are hacking around this confusion. With a separation of develop and
23master we lock functionalities into place and forcing a stable vs development
24version of the software.<p>But if that is true and the long living branches are the devil then why have
25develop at all. I think that most of this comes to how continuous integration is
26being done. There usually is no granular access to tags and CD software deploys
27what is present on a specific branch, may that be master for production and
28develop for staging. This is a gross simplification and by having this in place
29we have completely removed tagging as a viable option to create a fix point in
30software cycle that says, this is the production ready code.<p>One cool thing about tags are that you can checkout a specific tag. So they
31behave very similarly as branches in that regard. And you don’t have the
32overhead of having two mainstream branches.<p>So what is the solution? One approach is to use development workflow, where all
33changes are made on the smaller branches and continuously merged into
34master. Where the software is ready to be pushed to production you tag the
35master branch. This approach eliminates the need for long-lived branches and
36simplifies the development process. It also encourages developers to make small,
37incremental changes that can be tested and deployed quickly. However, this
38approach may not be suitable for all projects or teams that heavily rely on
39automated deployment based on branch names only.<p>This also requires that developers always keep production in mind. No more
40living on an island of the develop branch. All your actions and code need to be
41ready to meet production standards on a much smaller timescale.<p>I think that we have complicated the workflow in an honest attempt to make
42things more streamlined but in the process of doing this, we have inadvertently
43made our lives much more complicated.<p>In conclusion, it's important to re-evaluate our workflows from time to time to
44see if they still make sense and if there are better alternatives available.
45Long-living branches can be problematic, and using tags to mark important
46milestones can simplify the development process.</div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at
47<a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up
48with me
49<a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under
50the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
51otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file