<?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 Peter Hozák on Medium]]></title>
        <description><![CDATA[Stories by Peter Hozák on Medium]]></description>
        <link>https://medium.com/@peter.hozak?source=rss-f9dbb18311e0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*fKqOL303d_k7q7sahDgrHw.jpeg</url>
            <title>Stories by Peter Hozák on Medium</title>
            <link>https://medium.com/@peter.hozak?source=rss-f9dbb18311e0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 14:55:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@peter.hozak/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[Krkolomné Predpoklady]]></title>
            <link>https://medium.com/@peter.hozak/krkolomn%C3%A9-predpoklady-6f658f552de4?source=rss-f9dbb18311e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f658f552de4</guid>
            <category><![CDATA[translation]]></category>
            <category><![CDATA[slovak]]></category>
            <category><![CDATA[assumptions]]></category>
            <dc:creator><![CDATA[Peter Hozák]]></dc:creator>
            <pubDate>Sat, 30 May 2020 16:25:24 GMT</pubDate>
            <atom:updated>2020-05-30T16:25:24.852Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<h3>Krkolomné predpoklady</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vILEDKxuWzqgUtTujEu8Ig.jpeg" /><figcaption>Ľavý Pruh Musí Odbočiť Vľavo… A pravý pruh čo?</figcaption></figure><p><em>Pôvodný článok: </em><a href="https://medium.com/@peter.hozak/assumptions-treacherously-precious-2abe4b2b8f14"><em>Assumptions, treacherously precious</em></a></p><p>Ak by sme verili všetkému, čo <a href="https://www.google.com/search?q=choices+per+day">píšu na internete</a>, tak denne spravíme 35 000 rozhodnutí (<em>citované zdroje sa strácajú pri Sahakian &amp; Labuzetta, 2013, takže na presnosť čísla sa radšej nespoliehajme</em>). Koľko myslíš, že z týchto rozhodnutí sa spolieha na predpoklady, domnienky? Niečo, čo len <em>dúfaš</em>, že je pravdivé, ale nijak sa nesnažíš si to v daný moment overovať.</p><p>Zoširoka definované, samozrejme všetky, 100%.</p><p>Ak sa rozhodneš vykročiť vpred, predpokladáš, že <a href="https://scifi.stackexchange.com/questions/227826/is-datas-leg-length-of-eighty-seven-point-two-centimetres-based-on-an-actual-me">dĺžka nôh</a> sa Ti zrazu nezmenila. Že tá chodníková mláka vlastne nie je bezodná jama plná blata. Že sa neocitneš v prestrelke, ani na Teba nepadne klavír. Že súboj elektromagnetickej sily s gravitáciou (odpudivosť medzi elektrónmi v chodníku a topánkach vs. príťažlivosť medzi Tebou a <em>celou planétou</em>) dopadne remízou, a teda nespadneš do stredu Zeme ani neodletíš do vesmíru… Ehm, chápeme sa.</p><p>Avšak, ako programátori a testeri, potrebujeme rozumieť frázam ako “treba si overiť predpoklady,” “zdokumentuj predpoklady” a “nič také ako hlúpy nápad neexistuje,” ktoré počujeme od ľudí, čo častokrát nerozumejú , že to je naša denná práca. Príliš široká definícia nám tu <a href="https://www.goodreads.com/quotes/888934-a-theory-that-explains-everything-explains-nothing">moc nepomôže</a>, musíme si definovať pár predpokladov o ľuďoch, ktorí nám to odporučili.</p><blockquote>Mali by “sme” zdokumentovať všetky predpoklady…</blockquote><blockquote>… za predpokladu, že rozumieš, čo myslím tým “všetky.”</blockquote><p>Takže, sú to (viac menej) <em>ľudia</em>. Prežili evolučný výber, vedia sa rozumne správať a často používajú <a href="https://en.wikipedia.org/wiki/Behavioral_economics">dobre preštudované</a> skratky v myslení. Niektoré skratky sa, v modernej spoločnosti, nazývajú <a href="https://en.wikipedia.org/wiki/Cognitive_bias">kognitívne skreslenia</a>. Z nejakého dôvodu ich nevoláme “mega <a href="https://en.wikiquote.org/wiki/Donald_Knuth">predčasné optimalizácie</a>”.</p><p>Niektoré z najracionálnejších trikov na prežitie sú optimalizované do pozoruhodnej siete mozgových uzlov, ktorá je schopná počítať<a href="https://en.wikipedia.org/wiki/Bayesian_inference"> Bayeziánsku štatistik</a>u, so <a href="https://en.wikipedia.org/wiki/Separation_of_powers">systémom bŕzd a protiváh</a>, a bežne ju nazývame <a href="https://www.theatlantic.com/health/archive/2019/06/emotions-arent-irrational/592486/"><strong>pocity</strong></a>. Ľudia sú “hladní,” keď by mali niečo zjesť, “unavení,” keď treba spať, spravodlivo “rozhorčení,” keď im niekto krivdí, “boja sa” pri úteku pred nepriateľom a sú “nahnevaní,” keď plánujú pomstu. Všetko veľmi racionálne správanie, pred 12 020 rokmi.</p><p>Toto pre-optimalizované správanie aplikujeme aj v situáciách, keď vieme, že by sme nemali. Prejedáme sa, pijeme veľa kávy, chceme mať pravdu na internete, cítime sa menejcenne oproti skúsenejším kolegom a vyhadzujeme nevinné monitory von z okien na podozrivo vysokom poschodí…</p><p>Najrelevantnejšia optimalizácia pri diskusii o predpokladoch je <a href="https://en.wikipedia.org/wiki/Hindsight_bias">problém spätného pohľadu</a>, známe tiež ako “ja som to vedel!” Myslíš si, že som mohol spraviť lepšie rozhodnutie, keby som si to s Tebou dopredu vyjasnil a nie len niečo predpokladal. Takže <em>ja</em> by som si mal v budúcnosti dávať väčší pozor, čo predpokladám. A lepšie to zdokumentovať.</p><h4>Predpoklady pri vývoji softvéru</h4><p>Naša práca, keď píšeme kód, sa dá prirovnať k prekladu do jazyka <em>mimozemšťanov</em>. Počítač je skoro ako Marťan, ktorý sa musí riadiť zákonmi fyziky a dokáže počítať veľmi rýchlo, ale je fakt neschopný porozumenia čo to tí ľudia všetko predpokladajú.</p><p>Veľa z týchto predpokladov musíme vyniesť na svetlo. Špecifikácia požiadaviek, ktorá je dosť dobrá, aby ju pochopil aj počítač, sa volá “programovací jazyk.” Dobre vieš, že to nie je “Slovenčina,” napriek snahám marketérov presvedčiť Ťa o opaku. Hnutie “<a href="https://en.wikipedia.org/wiki/No-code_development_platform">bez kódu</a>” a vyvíjanie softvéru bez kódovania majú medzi sebou podobný vzťah ako “<a href="https://en.wikipedia.org/wiki/Democracy_Index">Demokratická republika Kongo</a>” a demokracia, alebo “<a href="https://en.wikipedia.org/wiki/Artificial_stupidity">Umelá inteligencia</a>” a inteligencia (t.j., ašpirujú na danú vlastnosť, ale ešte ju nedosiahli).</p><p>Netechnickí ľudia z nejakého dôvodu predpokladajú, že najnáročnejšia časť našej práce je porozumieť <em>počítačom</em>. Určite to chce tréning, ale rozumieť počítačom zase nie je až také ťažké. Nie, náročnejšie je rozumieť <em>ľuďom</em>. Zaznamenať niektoré Tvoje predpoklady explicitne v kóde.</p><p>Len niektoré, lebo väčšinu predpokladov s počítačom zdieľame. Nemusíme implementovať <a href="https://en.wikipedia.org/wiki/Schr%C3%B6dinger_equation">Schrödingerovu rovnicu</a>, protóny a elektróny vedia, čo robia aj bez dozoru, kremík sa nestane rádioaktívny. Ani <a href="https://en.wikipedia.org/wiki/Periodic_table">periodickú tabuľku</a>, molekuly vedia, čo robia, plasty samé od seba nevzbĺknu. A už vôbec nie <a href="https://en.wikipedia.org/wiki/HTTPS">HTTPS</a> protokol ako nadstavbu TPC/IP, lebo programátori, ktorí vytvorili naše nástroje (snáď) vedia, čo robia. Predpokladáme, že väčšinu predpokladov už za nás vyriešila platforma.</p><p>I tak, jediná slovenská veta sa dá premeniť na tisícky riadkov kódu. Extrémne zložitá implementácia mohla začať ako: “K tajným dokumentom by mali mať prístup iba užívatelia so správnymi oprávneniami.” plus milión predpokladov.</p><p>Zdokumentovať <em>všetky</em> predpoklady by bola úloha nadľudská. Všetci zúčastnení by museli odsúhlasiť presnú množinu predpokladov tak, aby bola táto množina dostatočná, keď v budúcnosti niekto objaví chybu. (Ale ak by existoval predpoklad, ktorým by sme chybe predišli, tak by táto chyba nenastala, a to by bola kontradikcia, teda <a href="https://en.wikipedia.org/wiki/Proof_by_contradiction">matematicky nemožné</a>. A aj keby sme túto možnú chybu zdokumentovali, niekto so spätným pohľadom by mohol povedať, že sme nesprávne predpokladali, či bolo OK zdokumentovať možnú chybu bez toho, aby sme ju opravili.)</p><p>Psychológovia asi nemajú jednoduchú úlohu, vysvetliť fungovanie ľudských bytostí iným ľuďom. Programátori to musia vysvetliť počítačom.</p><h4>Ako rozprávať o predpokladoch</h4><p><strong><em>Riadenie rizík</em></strong>. To je ten správny prístup pri dokumentovaní rozhodnutí. Prečo sme rozhodli A a nie B? Pretože to bolo výhodnejšie, keď sme to posúdili na základe C a D. Bohužiaľ sme nevedeli ako zmerať E a museli sme zatiaľ ignorovať F, ale plánujeme si nájsť viac dát o F, a ak bude treba, rozhodnutie zmeníme.</p><p><strong><em>Konkrétne príklady</em></strong>. To sú tie správne témy na hĺbkovú diskusiu. Čo robiť, aby sme túto chybu neopakovali? Koľko nás to stálo, môžme si dovoliť proste to odignorovať? Môžme si dovoliť ignorovať súčasné priority, ak sa začneme sústrediť na niečo nové?</p><p>Takže, ak odo mňa budeš chcieť, aby som zdokumentoval či overil <em>všetky</em> predpoklady, priprav sa na môj laserový pohľad 🐱.</p><p>Ako je na tom Tvoja predstavivosť, koľko toho predpokladáš o počítačoch, o používateľoch, o iných zúčastnených stranách? Oboznámil si sa s podobnými softvérovými riešeniami z minulosti, navrhované kroky sú podložené hĺbkovou analýzou minulých chýb, ako si zmeral <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4721437/">bezpečnosť a efektívnosť</a> odporučeného postupu?</p><p>Takéto otázky mi prebehnú hlavou skôr, než sa zdvorilo spýtam, čo presne máš na mysli. Dosť možno z toho vyjdem ako nekooperatívny, sarkastický cynik. Dosť možno je to len obranný mechanizmus voči tej irónii, že dostávam dobre mienené rady o predpokladoch, zatiaľ čo mojou prácou je konverzia veľkej kopy ľudských predpokladov do mimozemského jazyka. Prečo myslíš, že som sa včera pýtal tých 15 “dobiedzavých” otázok? To boli tie predpoklady, ktoré si nešpecifikovala a ja som ich považoval za nejasné. A aj zdokumentoval. Napísal som kód.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f658f552de4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Assumptions, treacherously precious]]></title>
            <link>https://medium.com/@peter.hozak/assumptions-treacherously-precious-2abe4b2b8f14?source=rss-f9dbb18311e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/2abe4b2b8f14</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[risk-management]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[assumptions]]></category>
            <category><![CDATA[management]]></category>
            <dc:creator><![CDATA[Peter Hozák]]></dc:creator>
            <pubDate>Thu, 28 May 2020 16:30:49 GMT</pubDate>
            <atom:updated>2023-04-17T15:50:32.334Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o_y5MbNpwFkzBQqTJ7AKFw.jpeg" /><figcaption>Left Lane Must Turn Left… Presumably, the right lane must do a lot of things too.</figcaption></figure><p>If we were to <a href="https://www.google.com/search?q=choices+per+day">trust the internet</a>, we’d make 35,000 choices every day (<em>the references are lost somewhere around Sahakian &amp; Labuzetta, 2013, but let’s not dwell too much on the exact number</em>). How many of those decisions rely on assumptions, would you gather? On one or more things that you only <em>hope</em> to be true, without putting any effort to verify them…</p><p>From a wide point of view, obviously, all of them, 100%.</p><p>If you decide to make a step, you assume that the <a href="https://scifi.stackexchange.com/questions/227826/is-datas-leg-length-of-eighty-seven-point-two-centimetres-based-on-an-actual-me">length of your legs</a> did not change (too much). That the sidewalk puddle is <em>not</em>, in fact, a bottomless mud pit. That you won’t get into cross fire, and no pianos will fall on you. That the fight between the electromagnetic force (electrons in the sidewalk repelling the electrons in your shoes) against the gravitational force (between you and<em> the whole planet</em>) will come to a draw, without you falling to the centre of the Earth or flying to the space… You get the idea.</p><p>But as programmers and testers, we often need to give meaning to the phrases “question your assumptions,” “document the assumptions,” and “there is no such thing as a stupid idea,” that we hear from people who don’t know how we do our daily job. Such a wide point of view<a href="https://www.goodreads.com/quotes/888934-a-theory-that-explains-everything-explains-nothing"> wouldn’t do us any good</a> and we need to make some assumptions about the people making these suggestions.</p><blockquote>“We” should document all assumptions...</blockquote><blockquote>…assuming you understand the set of things I mean when I say “all.”</blockquote><p>Well, they are (more or less) <em>human</em>. Survivors of natural selection, possessing a set of rational behaviours, together with a <a href="https://en.wikipedia.org/wiki/Behavioral_economics">well-studied</a> set of heuristics. In the modern society, we call some of the heuristics <a href="https://en.wikipedia.org/wiki/Cognitive_bias">cognitive biases</a>. For some reason, we don’t call them “the mother of all <a href="https://en.wikiquote.org/wiki/Donald_Knuth">premature optimizations</a>.”</p><p>Some of the most rational survival behaviours have been optimized into an impressive network of <a href="https://en.wikipedia.org/wiki/Bayesian_inference">Bayesian inference</a> modules in the brain, with <a href="https://en.wikipedia.org/wiki/Separation_of_powers">checks and balances</a>, commonly known as <a href="https://www.theatlantic.com/health/archive/2019/06/emotions-arent-irrational/592486/"><strong>emotions</strong></a>. Humans are “hungry” when they should eat, “tired” whey they should sleep, “righteous” when facing injustice, “afraid” when running from the enemy, and “angry” when plotting a revenge. All very rational, <a href="https://en.wikipedia.org/wiki/Holocene_calendar">12,020</a> years ago.</p><p>We even apply those super-optimized routines to situations when we know we shouldn’t. We over-eat, over-caffeinate, want to be right on the internet, feel like impostors when compared to senior colleagues, and we throw perfectly good monitors out of windows that are entirely too high above the ground…</p><p>The optimization most relevant for discussing assumptions is the <a href="https://en.wikipedia.org/wiki/Hindsight_bias">hindsight bias</a>. You believe that I would have made a better decision, if only I asked for a clarification explicitly, instead of making the wrong assumption. So that, in the future, <em>I</em> should be more careful about <em>my</em> assumptions. And to document them better.</p><h4>Assumptions in Software Development</h4><p>Our job, when writing code, can be compared to an <em>alien</em> language translation. The computer is like an alien being, who has to obey the laws of physics, who can calculate very fast, but who is utterly incapable of understanding even the basic assumptions of the <em>human</em> nature.</p><p>We make a lot of assumptions explicit. There is a reason that the specification of requirements good enough for a computer to understand is, without a fail, called “a programming language.” It ain’t called “English” and you know it, despite any snake oil sellers claiming otherwise. The relation of the “<a href="https://en.wikipedia.org/wiki/No-code_development_platform">no-code</a>” movement to no code is similar to the relation of “<a href="https://en.wikipedia.org/wiki/Democracy_Index">Democratic Republic of the Congo</a>” to democracy, or “<a href="https://en.wikipedia.org/wiki/Artificial_stupidity">Artificial Intelligence</a>” to intelligence (i.e., the relation is <em>aspirational</em>, not a factual description … <strong>Update 2023: </strong><em>oops, actually… GPT-4 probably meets all definitions of “intelligence” made before 2018 I guess — that certainly makes the job of understanding “computers” much harder now</em>).</p><p>Non-technical people, for some reason, assume that the hard part of our job is understanding <em>computers</em>. It certainly takes training, but it’s not that hard to understand computers. No, the hard part is understanding <em>humans</em>. Making some of your assumptions explicit in the code.</p><p>Only few of the assumptions, because we share most of them with the computer. We don’t re-implement the <a href="https://en.wikipedia.org/wiki/Schr%C3%B6dinger_equation">Schrodinger equation</a>, we trust that the protons and electrons know what they are doing, the silicon won’t become radioactive. Neither the <a href="https://en.wikipedia.org/wiki/Periodic_table">Periodic table</a>, we trust the molecules know what they are doing, the plastic mouse won’t self-combust. And certainly not <a href="https://en.wikipedia.org/wiki/HTTPS">HTTPS</a> over TCP/IP, we (mostly) trust the thousands of programmers that created our tools. We assume that most assumptions are already taken care of by the platform.</p><p>Nevertheless, a single English sentence can be converted into thousands of lines of code. A most complex implementation can be represented by: “Only users with the correct access level should be allowed to access the restricted documents.” and a million of assumptions.</p><p>There is no way anyone can document <em>all</em> of the assumptions, in the wide sense. There is no way we can agree on a precise set of assumptions that all involved people will consider sufficient in the future, after a mistake will be discovered. (If there was a way to prevent the mistake, the mistake would not have happened, which is a contradiction, thus not possible, <a href="https://en.wikipedia.org/wiki/Proof_by_contradiction">mathematically speaking</a>. Even if you document that a mistake can happen, the hindsighted people will feel free to blame you that you assumed incorrectly whether or not it was OK to document this known issue without fixing it.)</p><p>Psychologists might not have an easy job of explaining humans to other humans. Programmers have to explain humans to computers.</p><h4>Talking about assumptions</h4><p><strong><em>Risk management</em></strong>. That is the correct framework for documenting decisions. Why did we decide A instead of B? Because it was better when we considered C and D. We couldn’t measure E and we ignored F for now, though we plan to investigate F more and update the decision later if needed.</p><p><strong><em>Concrete examples</em></strong>. Those are the correct topics to discuss deeply. How do we prevent the same mistake? How much did it cost us, can we afford to ignore it? Can we afford to ignore the current priorities if we shift our focus?</p><p>But if you ask me to document, question, or validate “all” the assumptions, be prepared for the laser lights shining from my eyes 🐱.</p><p>How big is your imagination, how much do you assume about the computers, about our users, the stakeholders? Are you familiar with similar software solutions from the past, did you base your suggestion on the past mistakes analyzed deeply, how did you measure the <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4721437/">safety and efficacy</a> of the treatment?</p><p>Those questions will cross my mind before I ask politely what exactly do you mean. Chances are <em>I</em> will come across as sarcastic, cynical, and non-cooperative. Chances are those are my defense mechanisms against the irony of receiving advice about assumptions, when my job is converting tons of human assumptions to an alien language all along. Why do you think I have been asking the 15 “nitpicking” question yesterday? Those were the assumptions you haven’t specified that I found unclear. And I documented them — I wrote code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2abe4b2b8f14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Long-lived git branches survival guide]]></title>
            <link>https://medium.com/@peter.hozak/long-lived-git-branches-survival-guide-f3b1028d21d?source=rss-f9dbb18311e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3b1028d21d</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[branching-strategy]]></category>
            <dc:creator><![CDATA[Peter Hozák]]></dc:creator>
            <pubDate>Thu, 21 May 2020 18:32:39 GMT</pubDate>
            <atom:updated>2020-06-04T12:49:25.153Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0EQ1fx2DfUu_qbz3svBUGg.png" /></figure><p>Chances are that your team is using <a href="https://trunkbaseddevelopment.com/">Trunk Based Development</a>,<br>or <a href="https://guides.github.com/introduction/flow/">GitHub flow</a> with only one long-lived branch (master). Your life is simple.</p><p>Then again, one day, you might find yourself supporting multiple versions of a product. Each version living in a different branch of your <a href="https://git-scm.com/">git</a> repository (or even in multiple forks). And there are four(-tien) other developers who also contribute daily.</p><p>So you already learned all about <a href="https://www.atlassian.com/git/tutorials/merging-vs-rebasing">Merging vs. Rebasing,</a> either <em>just in case™️</em> or out of necessity.</p><p>This article is not about such simple matters.</p><p>Following tips are here to keep you sane in your darkest hours, when you burned yourself by a 3-line git command and it still didn’t <em>do</em> what you <em>wanted</em>. Tips to prevent<em> the next time</em>. Tips to <em>survive</em>.</p><h3>1. Unless you HAVE to, don’t use long-lived branches</h3><p>It should go without saying, but unless you want to develop 2 <em>independent</em> things, then stick to one master branch and merge your short-lived feature branches ASAP (e.g. daily, after code review). And if you cannot merge the feature branch every day, then at least rebase it to the latest master every morning, to keep it up to date.</p><p>Create a new branch for a release only <em>after</em> you need to maintain 2 different versions. Use git tags for release candidates if you need to keep a good track of what is deployed in test environments. Keep in mind that a branch can be created from any commit, not just from HEAD.</p><h3>2. Don’t mix branches</h3><p>If you need to create a short-lived branch for a pull request, start it from the correct long-lived branch. Any changes to release/01 should be started from release/01 and <em>not</em> from the newest master (you <em>don’t</em> want to include all changes from master, that’s why you have <em>multiple</em> branches, right? <strong>ಠ_ಠ</strong>).</p><p>If you already made a fix in a branch started from master, then create a new branch from release/01 and <a href="https://git-scm.com/docs/git-cherry-pick">cherry pick</a> 🍒 that one commit into the correct branch. Then double check everything in the diff — cherry pick is <em>not</em> a magical operation that will do what you want. Think about it as the +1 part of 3 + 1 vs 2 + 1…</p><h3>3. Fake merge</h3><p>Sometimes you end up in a situation when you want to synchronize 2 branches without modifying any files, after you manually solved the merge conflicts outside of a git merge command. You might be tempted by -Xtheirs or -Xours <a href="https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_our_or_theirs_preference">merge options</a>, but those would perform a normal merge while <em>skipping conflicts</em>, and we don’t want any change to any file right now.</p><p><strong><em>Our strategy</em></strong> is -s ours.</p><p>An example of fake merge of <em>release into master</em> (without changing any file):</p><pre>git checkout master<br>git merge -s ours release/01</pre><p>While you could fake-merge master into release, stop and think again what you were about to do next— do you really want to get into <em>more</em> trouble?</p><h3>4. The Prime Directive</h3><p>Finally, remember that this is one of the rare occasions when the end justifies the means —your build process cares only about the current version of the code, not about git history.</p><blockquote>Only the code matters, not the journey.</blockquote><p>If all else fails, just start over. Make a backup, hard reset everything that is not released yet, and make one good commit at a time until you end up with the desired code in each branch.</p><p>Git history is important for the future archeologists (a.k.a. git blame, bisect, …), but not as important as shipping the correct code ¯\_(ツ)_/¯</p><blockquote>I am Peter, a software engineer. Everything without a link is just my opinion. <a href="https://peter.hozak.info/">https://peter.hozak.info/</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3b1028d21d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>