<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/atom.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Posts tagged: git</title>
  <id>https://pype.dev/tags/git/atom.xml</id>
  <updated>2025-10-28T11:16:37Z</updated>
  <subtitle>All posts with the tag &#34;git&#34;</subtitle>
  <link href="https://pype.dev/tags/git/" rel="alternate" type="text/html"></link>
  <link href="https://pype.dev/tags/git/atom.xml" rel="self" type="application/atom+xml"></link>
  <author>
    <name>Nic Payne</name>
  </author>
  <generator uri="https://github.com/WaylonWalker/markata-go">markata-go</generator>
  <entry>
    <title>💭 You already have a git server: (Maurycy’s blog)</title>
    <id>https://pype.dev/thoughts-856/</id>
    <updated>2025-10-28T11:16:37Z</updated>
    <published>2025-10-28T11:16:37Z</published>
    <link href="https://pype.dev/thoughts-856/" rel="alternate" type="text/html"></link>
    <summary type="text">Using my server&#39;s filesystem + ssh + git-hooks for the simplest self-hosted CI pipelines ever sounds like a pretty cool</summary>
    <content type="html">&lt;a href=&#34;https://maurycyz.com/misc/easy_git/&#34;&gt;&#xA;    &lt;img&#xA;        src=&#34;https://shots.wayl.one/shot/?url=https://maurycyz.com/misc/easy_git/&amp;height=450&amp;width=800&amp;scaled_width=800&amp;scaled_height=450&amp;selectors=&#34;&#xA;        alt=&#34;shot of post - You already have a git server: (Maurycy&#39;s blog)&#34;&#xA;        height=450&#xA;        width=800&#xA;    &gt;&#xA;&lt;/a&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s my thought on &lt;a href=&#34;https://maurycyz.com/misc/easy_git/&#34;&gt;You already have a git server: (Maurycy&amp;rsquo;s blog)&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;Using my server&amp;rsquo;s filesystem + ssh + git-hooks for the simplest self-hosted CI pipelines ever sounds like a pretty cool setup. Probably would lose any cool graphics like GH Actions gives you but for full sovereignty over your code + zero bloat it&amp;rsquo;s an appealing pattern&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;div class=&#34;admonition note&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Note&lt;/p&gt;&#xA;&lt;p&gt;This is one of [[ my-thoughts ]]. I picked this up from &lt;a href=&#34;https://waylonwalker.com&#34;&gt;Waylon Walker&lt;/a&gt;(&lt;a href=&#34;https://thoughts.waylonwalker.com&#34;&gt;https://thoughts.waylonwalker.com&lt;/a&gt;). It&amp;rsquo;s a short note that I make about someone else&amp;rsquo;s content online.  Learn more about the process &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;My thoughts are found at my thoughts feed&#34; data-date=&#34;2025-06-09&#34; data-preview=&#34;My thoughts are found at my thoughts feed&#34;&gt;Thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Docker Compose Build From Git Repo</title>
    <id>https://pype.dev/docker-compose-build-from-git-repo/</id>
    <updated>2025-09-12T08:45:20Z</updated>
    <published>2025-09-12T08:45:20Z</published>
    <link href="https://pype.dev/docker-compose-build-from-git-repo/" rel="alternate" type="text/html"></link>
    <summary type="text">You can reference a git repo in compose&#39;s &#34;build&#34; argument for a service as of this PR</summary>
    <content type="html">&lt;p&gt;You can reference a git repo in compose&amp;rsquo;s &amp;ldquo;build&amp;rdquo; argument for a service as of &lt;a href=&#34;https://github.com/docker/compose/pull/2430&#34;&gt;this PR&lt;/a&gt;&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>You suck at git - but it’s honestly fine</title>
    <id>https://pype.dev/you-suck-at-git-but-its-honestly-fine/</id>
    <updated>2025-07-21T05:20:07Z</updated>
    <published>2025-07-21T05:20:07Z</published>
    <link href="https://pype.dev/you-suck-at-git-but-its-honestly-fine/" rel="alternate" type="text/html"></link>
    <summary type="text">I just started listening to localfirst.fm podcast podcast and would recommend it after 2 episodes. In the first episode, the hosts discuss where the term...</summary>
    <content type="html">&lt;h2 id=&#34;git-is-for-everyone&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Git is for everyone&lt;/span&gt; &lt;a href=&#34;#git-is-for-everyone&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I just started listening to &lt;a href=&#34;https://www.localfirst.fm/&#34;&gt;localfirst.fm podcast&lt;/a&gt;&#xA;podcast and would recommend it after 2 episodes. In the first episode, the&#xA;hosts discuss where the term &lt;code&gt;localfirst&lt;/code&gt; comes from, what it means, and&#xA;examples of some localfirst, or semi-localfirst projects. One of them is &lt;code&gt;git&lt;/code&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the de-facto standard by which developers share code today.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;There&amp;rsquo;s a reason it&amp;rsquo;s the standard. I&amp;rsquo;m not arguing that it&amp;rsquo;s perfect, and&#xA;there&amp;rsquo;s new abstractions that may help people adopt usage like&#xA;&lt;a href=&#34;https://github.com/jj-vcs/jj&#34;&gt;jujutsu&lt;/a&gt;, but ultimately &lt;code&gt;git&lt;/code&gt; is a great tool,&#xA;and anyone can use it who works with text files (lookin at you book-writing&#xA;nerds)&lt;/p&gt;&#xA;&lt;p&gt;But as I was enjoying the pod the co-host/guest said &amp;ldquo;and we all know the git user&#xA;experience isn&amp;rsquo;t that great&amp;rdquo;&lt;/p&gt;&#xA;&lt;div class=&#34;admonition danger&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;heavy sigh&lt;/p&gt;&#xA;&lt;p&gt;Git isn&amp;rsquo;t that hard - you probably just aren&amp;rsquo;t that good at it&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;it-s-ok&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;It’s OK&lt;/span&gt; &lt;a href=&#34;#it-s-ok&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Don&amp;rsquo;t hear me say that you suck at git like that&amp;rsquo;s a bad thing&amp;hellip; It&amp;rsquo;s &lt;em&gt;totally&#xA;fine&lt;/em&gt; to not be a wizard. Many people can use git like 80-90% efficiently for&#xA;their own use cases. In fact, my usage of git doesn&amp;rsquo;t fall into any perfectly&#xA;established patterns, and the decisions I make are not always the same (the&#xA;overplayed rebase vs merge-upstream argument&amp;hellip; I do both, it doesn&amp;rsquo;t matter,&#xA;squash your crap at the end anyways&amp;hellip;)&lt;/p&gt;&#xA;&lt;p&gt;So continue to collaborate - checkout your feature branches, pull in&#xA;&lt;code&gt;origin/main&lt;/code&gt; after a PR, ask for help with a rebase for the 69th time if you&#xA;need to&lt;/p&gt;&#xA;&lt;div class=&#34;admonition danger&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Danger&lt;/p&gt;&#xA;&lt;p&gt;But quit your stupid annoying bitching&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;seriously&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Seriously&lt;/span&gt; &lt;a href=&#34;#seriously&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Honestly, I learned &lt;em&gt;about&lt;/em&gt; git 8 years ago when I started my first job as a&#xA;data scientist. I was told by another developer, Jokko,&#xA;that it was the standard for collaboration&amp;hellip; only issue was that almost no one&#xA;in our division even used it. Or if they did it was at the end of a project,&#xA;after sharing code on share drives and OneDrive, at the very end we&amp;rsquo;d see &lt;code&gt;git init&lt;/code&gt;, &lt;code&gt;git add .&lt;/code&gt;, &lt;code&gt;git commit -m &amp;quot;pushed to git&amp;quot;&lt;/code&gt;, &lt;code&gt;git push&lt;/code&gt;&amp;hellip; literally 0&#xA;value, or at least no more value than&#xA;&lt;code&gt;my_project_final_FINAL_v2_project-over-now.zip&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;It took me a few weeks of on-the-job git usage, practicing way over complicated&#xA;git flows and talking about git with the few people around me who knew it, for&#xA;me to become a go-to resource&amp;hellip; I was and am honestly still annoyed about&#xA;it&amp;hellip; It didn&amp;rsquo;t take that long, or that much effort, to get pretty comfortable&#xA;with git. There&amp;rsquo;s tons of UIs (with their own flaws), TUIs, and resources for&#xA;learning the few things that will make you stand out as a git wizard:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;can you rebase onto a new root commit?&lt;/li&gt;&#xA;&lt;li&gt;can you pull in changes from someone else&amp;rsquo;s feature branch?&lt;/li&gt;&#xA;&lt;li&gt;if you find yourself in &lt;code&gt;detached HEAD state&lt;/code&gt; are you panicked?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Just make a directory, &lt;code&gt;git init&lt;/code&gt;, and start shitting all over text files&amp;hellip;&#xA;make branches, reconcile differences, just freaking practice for 10 minutes&lt;/p&gt;&#xA;&lt;h2 id=&#34;end&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;End&lt;/span&gt; &lt;a href=&#34;#end&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I was triggered I guess listening to this podcast episode&amp;hellip; It&amp;rsquo;s fine to not&#xA;be an expert, it&amp;rsquo;s fine to just use the 3 or 4 commands you probably need (&lt;code&gt;git checkout -b, rebase origin/main, merge feature/branch, push&lt;/code&gt;), I am happy to&#xA;help people with git everyday - like I said above, I am somehow a go-to&#xA;resource for git in my workplace&amp;hellip;. (heck, even one of my managers asks me to&#xA;squash all the commits on his feature branches for him before it&amp;rsquo;s merged to&#xA;main&amp;hellip; it&amp;rsquo;s fine)&lt;/p&gt;&#xA;&lt;p&gt;But the user experience isn&amp;rsquo;t bad, so quit your bitching.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;details class=&#34;admonition note&#34;&gt;&#xA;&lt;summary class=&#34;admonition-title&#34;&gt;phone notes&lt;/summary&gt;&#xA;&lt;p&gt;hot take, if you complain about git then you don&amp;rsquo;t it&amp;hellip; and that&amp;rsquo;s fine but&#xA;shut up. I love git,I use it in a way that&amp;rsquo;s productive for me, and when I hear&#xA;people complain all they ever say is &amp;ldquo;git is hard&amp;rdquo; and &amp;ldquo;why is rebasing so&#xA;hard?!?!&amp;rdquo;&#xA;but they don&amp;rsquo;t get it, and that&amp;rsquo;s fine. you can use git inefficiently, as a&#xA;requirement of your job, and not enjoy it. but don&amp;rsquo;t bitch, because with 10&#xA;minutes of practice you could gain some real fluency in rebasing&lt;/p&gt;&#xA;&lt;/details&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>💭 Add confirmation for hard reset by stefanhaller · Pull Request…</title>
    <id>https://pype.dev/thoughts-739/</id>
    <updated>2025-07-08T11:25:30Z</updated>
    <published>2025-07-08T11:25:30Z</published>
    <link href="https://pype.dev/thoughts-739/" rel="alternate" type="text/html"></link>
    <summary type="text">I float between lazygit and gitui still for my terminal-based git flow and I want to lean into lazygit more fully. One i</summary>
    <content type="html">&lt;a href=&#34;https://github.com/jesseduffield/lazygit/pull/4704&#34;&gt;&#xA;    &lt;img&#xA;        src=&#34;https://shots.wayl.one/shot/?url=https://github.com/jesseduffield/lazygit/pull/4704&amp;height=450&amp;width=800&amp;scaled_width=800&amp;scaled_height=450&amp;selectors=&#34;&#xA;        alt=&#34;shot of post - Add confirmation for hard reset by stefanhaller · Pull Request #4704 · jesseduffield/lazygit&#34;&#xA;        height=450&#xA;        width=800&#xA;    &gt;&#xA;&lt;/a&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s my thought on &lt;a href=&#34;https://github.com/jesseduffield/lazygit/pull/4704&#34;&gt;Add confirmation for hard reset by stefanhaller · Pull Request #4704 · jesseduffield/lazygit&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;I float between lazygit and gitui still for my terminal-based git flow and I want to lean into lazygit more fully. One issue is that the keybinding for lazygit &lt;C-d&gt; brings up a menu there the first option is to nuke the entire working tree&amp;hellip; in gitui this just resets the one file that&amp;rsquo;s highlighted in the TUI. So that&amp;rsquo;s obviously 100% my fault, however it&amp;rsquo;s nice to see this PR open for adding confirmation for this potential blunder that has cost me several uncommitted scripts and changes&amp;hellip;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;div class=&#34;admonition note&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Note&lt;/p&gt;&#xA;&lt;p&gt;This is one of [[ my-thoughts ]]. I picked this up from &lt;a href=&#34;https://waylonwalker.com&#34;&gt;Waylon Walker&lt;/a&gt;(&lt;a href=&#34;https://thoughts.waylonwalker.com&#34;&gt;https://thoughts.waylonwalker.com&lt;/a&gt;). It&amp;rsquo;s a short note that I make about someone else&amp;rsquo;s content online.  Learn more about the process &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;My thoughts are found at my thoughts feed&#34; data-date=&#34;2025-06-09&#34; data-preview=&#34;My thoughts are found at my thoughts feed&#34;&gt;Thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Git fetch failing - check your config</title>
    <id>https://pype.dev/git-fetch-failing-check-your-config/</id>
    <updated>2024-04-18T08:32:33Z</updated>
    <published>2024-04-18T08:32:33Z</published>
    <link href="https://pype.dev/git-fetch-failing-check-your-config/" rel="alternate" type="text/html"></link>
    <summary type="text">I started deploying a website to Cloudflare on a branch called . Similar to one of the GH Pages deployment patterns. But when my CI was pushing the branch I...</summary>
    <content type="html">&lt;p&gt;I started deploying a website to Cloudflare on a branch called &lt;code&gt;pages&lt;/code&gt;. Similar to one of the GH Pages deployment patterns. But when my CI was pushing the branch I couldn&amp;rsquo;t see it locally&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;git fetch -a&lt;/code&gt; wasn&amp;rsquo;t pulling any new branches, and &lt;code&gt;git branch -a&lt;/code&gt; was only showing my development and main branches at the remote&amp;hellip; so what gives?&lt;/p&gt;&#xA;&lt;p&gt;I checked my git config, and to this moment I have no idea how this happened but check out my fetch config:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git config --get remote.origin.fetch&#xA;+refs/tags/*:refs/tags/*&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So to fix this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git config remote.origin.fetch &#39;+refs/heads/*:refs/remotes/origin/*&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now &lt;code&gt;git fetch -a&lt;/code&gt; works again&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt; git fetch -a&#xA;&#xA;From github.com:DigitalHarbor7/DigitalHarbor&#xA;   357a28a..969b027  develop    -&amp;gt; origin/develop&#xA;   c052ac9..6d40210  main       -&amp;gt; origin/main&#xA; * [new branch]      pages      -&amp;gt; origin/pages&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Git repo specific SSH Key!</title>
    <id>https://pype.dev/git-repo-specific-ssh-key/</id>
    <updated>2024-01-04T15:42:15Z</updated>
    <published>2024-01-04T15:42:15Z</published>
    <link href="https://pype.dev/git-repo-specific-ssh-key/" rel="alternate" type="text/html"></link>
    <summary type="text">git config --add --local core.sshCommand &#39;ssh -i &gt;&gt;&#39;</summary>
    <content type="html">&lt;p&gt;git config &amp;ndash;add &amp;ndash;local core.sshCommand &amp;lsquo;ssh -i &amp;laquo;&amp;lt;PATH_TO_SSH_KEY&amp;raquo;&amp;gt;&amp;rsquo;&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>See git history about one file</title>
    <id>https://pype.dev/see-git-history-about-one-file/</id>
    <updated>2022-05-19T06:43:32Z</updated>
    <published>2022-05-19T06:43:32Z</published>
    <link href="https://pype.dev/see-git-history-about-one-file/" rel="alternate" type="text/html"></link>
    <summary type="text">In vim does a . You get every commit that the target file is apart of (so there might be info in those commits unrelated)</summary>
    <content type="html">&lt;p&gt;In vim &lt;code&gt;G clog %&lt;/code&gt; does a &lt;code&gt;git clog {current file}&lt;/code&gt;. You get every commit that the target file is apart of (so there might be info in those commits unrelated)&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Git-Bisect</title>
    <id>https://pype.dev/git-bisect/</id>
    <updated>2022-05-03T00:00:00Z</updated>
    <published>2022-05-03T00:00:00Z</published>
    <link href="https://pype.dev/git-bisect/" rel="alternate" type="text/html"></link>
    <summary type="text">I try to commit a lot, and I also try to write useful tests appropriate for the scope of work I&#39;m focusing on, but sometimes I drop the ball...</summary>
    <content type="html">&lt;p&gt;I try to commit a lot, and I also try to write useful tests appropriate for the scope of work I&amp;rsquo;m focusing on, but sometimes I drop the ball&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;Whether by laziness, ignorance, or accepted tech debt I don&amp;rsquo;t always code perfectly and recently I was dozens of commits into a new feature before realizing I broke something along the way that none of my tests caught&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;Before today I would&amp;rsquo;ve manually reviewed every commit to see if something obvious slipped by me (talk about a time suck 😩)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;There must be a better way&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;bisect&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Bisect?&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;git bisect&lt;/code&gt; is the magic sauce for this exact problem&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;You essentially create a range of commits to consider and let &lt;code&gt;git bisect&lt;/code&gt; guide you through them in a manner akin to Newton&amp;rsquo;s method for finding the root of a continuous function.&lt;/p&gt;&#xA;&lt;h1 id=&#34;how-to-do-it&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;How to do it?&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;Start with &lt;code&gt;git bisect start&lt;/code&gt; and then choose the first &lt;code&gt;good&lt;/code&gt; commit (ie. a commit you know the bug isn&amp;rsquo;t present in)&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sandbox   bisect-post   ×1 via   v3.8.11&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;sandbox&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  on  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;us-east-1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git bisect start&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sandbox   bisect-post &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;BISECTING&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   ×1 via   v3.8.11&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;sandbox&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  on  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;us-east-1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git bisect good 655332b&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bisect-post  HEAD         main         ORIG_HEAD&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;5b31e1e  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;    add successful print &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;52&lt;/span&gt; seconds ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;308247b  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD^&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;   init another loop &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;77&lt;/span&gt; seconds ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;4555c59  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD^^&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  introduce bug &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;9cf6d55  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~3&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  add successful loop &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;3&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bcb41c3  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~4&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  change x to &lt;span class=&#34;m&#34;&gt;10&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;4&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3c34aac  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~5&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  init x to &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;4&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;12e53bd  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~6&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  print cwd &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;4&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;655332b  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~7&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  add example.py &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;10&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# &amp;lt;- I want to start at this commit&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;59e0048  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~8&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  gitignore &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;23&lt;/span&gt; hours ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fb9e1fb  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~9&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  add reqs &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;23&lt;/span&gt; hours ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sandbox   bisect-post &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;BISECTING&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   ×1 via   v3.8.11&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;sandbox&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  on  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;us-east-1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git bisect bad 5b31e1e&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bisect-post                                                ORIG_HEAD&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;HEAD                                                       refs/bisect/good-655332b6c384934c2c00c3d4aba3011ccc1e5b57&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;5b31e1e  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;    add successful print &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;5&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# &amp;lt;- I start here with the &amp;#34;bad&amp;#34; commit&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;308247b  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD^&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;   init another loop &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;6&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;4555c59  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD^^&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  introduce bug &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;6&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;9cf6d55  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~3&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  add successful loop &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;7&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bcb41c3  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~4&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  change x to &lt;span class=&#34;m&#34;&gt;10&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;8&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3c34aac  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~5&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  init x to &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;9&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;12e53bd  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~6&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  print cwd &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;9&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;655332b  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~7&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  add example.py &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;14&lt;/span&gt; minutes ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;59e0048  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~8&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  gitignore &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;23&lt;/span&gt; hours ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fb9e1fb  -- &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;HEAD~9&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  add reqs &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;23&lt;/span&gt; hours ago&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After starting bisect with a &amp;ldquo;good&amp;rdquo; start commit and a &amp;ldquo;bad&amp;rdquo; ending commit we can let git to it&amp;rsquo;s thing!&lt;/p&gt;&#xA;&lt;p&gt;Git checksout a commit somewhere about halfway between the good and bad commit so you can see if your bug is there or not.&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sandbox   bisect-post &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;BISECTING&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   ×1 via   v3.8.11&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;sandbox&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  on  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;us-east-1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git bisect bad 5b31e1e&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Bisecting: &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt; revisions left to &lt;span class=&#34;nb&#34;&gt;test&lt;/span&gt; after this &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;roughly &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; steps&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;bcb41c3854e343eade85353683f2c1c4ddde4e04&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; change x to &lt;span class=&#34;m&#34;&gt;10&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sandbox   HEAD &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;bcb41c38&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;BISECTING&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   ×1 via   v3.8.11&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;sandbox&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  on  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;us-east-1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In my example here I have a python script with some loops and print statements - they aren&amp;rsquo;t really relevant, I just wanted an easy to follow git history.&lt;/p&gt;&#xA;&lt;p&gt;So I check to see if the bug is present or not either by running/writing tests or replicating the bug somehow.&lt;/p&gt;&#xA;&lt;p&gt;In this session commit &lt;code&gt;bcb41c38&lt;/code&gt; is actually just fine, so I do &lt;code&gt;git bisect good&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sandbox   HEAD &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;bcb41c38&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;BISECTING&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   ×1 via   v3.8.11&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;sandbox&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  on  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;us-east-1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git bisect good&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Bisecting: &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; revision left to &lt;span class=&#34;nb&#34;&gt;test&lt;/span&gt; after this &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;roughly &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; step&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;4555c5979268dff6c475365fdc5ce1d4a12bd820&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; introduce bug&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And we see that git moves on to checkout another commit&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;In this case the next commit is the one where I introduced a bug&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;git bisect bad&lt;/code&gt; then gives me:&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sandbox   HEAD &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;4555c597&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;BISECTING&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   ×1 via   v3.8.11&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;sandbox&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  on  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;us-east-1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git bisect bad&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Bisecting: &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; revisions left to &lt;span class=&#34;nb&#34;&gt;test&lt;/span&gt; after this &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;roughly &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; steps&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;9cf6d55301560c51e2f55404d0d80b1f1e22a33d&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; add successful loop&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At &lt;code&gt;4555c597&lt;/code&gt; the script works as expected so one more &lt;code&gt;git bisect good&lt;/code&gt; yields&amp;hellip;&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sandbox   HEAD &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;9cf6d553&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;BISECTING&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   ×1 via   v3.8.11&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;sandbox&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  on  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;us-east-1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git bisect good&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;4555c5979268dff6c475365fdc5ce1d4a12bd820 is the first bad commit&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;commit 4555c5979268dff6c475365fdc5ce1d4a12bd820&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Author: &lt;span class=&#34;c1&#34;&gt;########################### &lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Tue May &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt; 09:00:00 &lt;span class=&#34;m&#34;&gt;2022&lt;/span&gt; -0500&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    introduce bug&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; example.py &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; +-&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; file changed, &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; insertion&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;, &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; deletion&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;-&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h1 id=&#34;what-happened&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;What happened?&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;Git sliced up a range of commits based on me saying of the next one was good or bad and localized the commit that introduced a bug into my workflow!&lt;/p&gt;&#xA;&lt;p&gt;I didn&amp;rsquo;t have to manually review commits, click through logs, etc&amp;hellip; I just let git checkout relevant commits and I ran whatever was appropriate for reproducing the bug to learn when it was comitted!&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Mu</title>
    <id>https://pype.dev/mu/</id>
    <updated>2022-03-15T00:00:00Z</updated>
    <published>2022-03-15T00:00:00Z</published>
    <link href="https://pype.dev/mu/" rel="alternate" type="text/html"></link>
    <summary type="text">If you work with a template for several projects then you might sometimes need to do the same action across all repos. A good example of this is updating a...</summary>
    <content type="html">&lt;p&gt;If you work with a template for several projects then you might sometimes need to do the same action across all repos.&#xA;A good example of this is updating a package in &lt;code&gt;requirements.txt&lt;/code&gt; in every project, or refactoring a common module.&#xA;If you have several repos to do this across then it can be time consuming&amp;hellip; enter &lt;code&gt;mu-repo&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;mu&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Mu&lt;/span&gt; &lt;a href=&#34;#mu&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://fabioz.github.io/mu-repo/&#34;&gt;mu-repo&lt;/a&gt; is an awesome cli tool for working with multiple git repositories at the same time.&#xA;There are several things you can do:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;mu status&lt;/code&gt; will give you the &lt;code&gt;git status&lt;/code&gt; of every registered repo (see below)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;mu sh&lt;/code&gt; will let you execute system level commands in every repo&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;mu stash&lt;/code&gt; will stash all changes across all registered repos&lt;/li&gt;&#xA;&lt;li&gt;There&amp;rsquo;s literally a ton more but these are some handy ones&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;registration&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Registration&lt;/span&gt; &lt;a href=&#34;#registration&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;mu&lt;/code&gt; tracks its own &lt;code&gt;groups&lt;/code&gt;, and there is a default group when no particular one is active.&#xA;It&amp;rsquo;s as simple as &lt;code&gt;mu register proj1 prog2 ...&lt;/code&gt; to get repos registered&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ mu register proj1 proj2&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Repository: proj1 registered&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Repository: proj2 registered&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ mu status&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  proj1 : git status&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    On branch main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    No commits yet&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    Untracked files:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;use &lt;span class=&#34;s2&#34;&gt;&amp;#34;git add &amp;lt;file&amp;gt;...&amp;#34;&lt;/span&gt; to include in what will be committed&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    requirements.txt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    nothing added to commit but untracked files present &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;use &lt;span class=&#34;s2&#34;&gt;&amp;#34;git add&amp;#34;&lt;/span&gt; to track&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  proj2 : git status&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    On branch main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    No commits yet&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    Changes to be committed:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;use &lt;span class=&#34;s2&#34;&gt;&amp;#34;git rm --cached &amp;lt;file&amp;gt;...&amp;#34;&lt;/span&gt; to unstage&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    new file:   requirements.txt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;working-with-mu&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Working with mu&lt;/span&gt; &lt;a href=&#34;#working-with-mu&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;As you can see above I have two projects each with a &lt;code&gt;requirements.txt&lt;/code&gt; added but not committed yet.&#xA;Using &lt;code&gt;mu&lt;/code&gt; I can stage this change across both repos at once.&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ mu add requirements.txt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  proj1 : git add requirements.txt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  proj2 : git add requirements.txt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then as you might imagine, I can make the commit in each repo&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ mu commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;Add requirements.txts&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  proj1 : git commit -m Add requirements.txts&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;main &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;root-commit&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 18376d7&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; Add requirements.txts&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; file changed, &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; insertion&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    create mode &lt;span class=&#34;m&#34;&gt;100644&lt;/span&gt; requirements.txt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  proj2 : git commit -m Add requirements.txts&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;main &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;root-commit&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 18376d7&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; Add requirements.txts&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; file changed, &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; insertion&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    create mode &lt;span class=&#34;m&#34;&gt;100644&lt;/span&gt; requirements.txt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;mu-groups&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;mu groups&lt;/span&gt; &lt;a href=&#34;#mu-groups&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The other thing I got a lot of use out of recently was &lt;code&gt;mu&lt;/code&gt;&amp;rsquo;s groups.&#xA;At work I have about 40 repos cloned that are all based on the same kedro pipeline template.&#xA;Some of these projects have been deprecated.&#xA;I also have several more repos that are not kedro template - custom libraries or something.&#xA;&lt;code&gt;group&lt;/code&gt; let me utilize &lt;code&gt;mu&lt;/code&gt; across different groups of repos.&lt;/p&gt;&#xA;&lt;p&gt;Say &lt;code&gt;proj2&lt;/code&gt; is a deprecated project that I don&amp;rsquo;t need to worry about making changes to anymore.&#xA;I don&amp;rsquo;t just have to unregister it, instead I can make a group called &amp;ldquo;active&amp;rdquo; and register &lt;code&gt;proj1&lt;/code&gt; in that group&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ mu group add active --empty&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;~/personal&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ mu group add deprecated --empty&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;~/personal&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ mu group&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  active&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;* deprecated&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;*&lt;/code&gt; tells me which group is active.&#xA;The &lt;code&gt;--empty&lt;/code&gt; flag tells &lt;code&gt;mu&lt;/code&gt; to not add all registered repos to that group.&#xA;If I don&amp;rsquo;t want to use any groups then &lt;code&gt;mu group reset&lt;/code&gt; will go back to the default group with all registered repos.&lt;/p&gt;&#xA;&lt;p&gt;With groups I can register only the repos that I want to be working across in their own group and not worry about affecting other repos with my batch changes!&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Git-Worktrees-01</title>
    <id>https://pype.dev/git-worktrees-01/</id>
    <updated>2022-03-11T00:00:00Z</updated>
    <published>2022-03-11T00:00:00Z</published>
    <link href="https://pype.dev/git-worktrees-01/" rel="alternate" type="text/html"></link>
    <summary type="text">Hopefully if you write code you are using git, if not go learn the basics of , , , and / like... right now.</summary>
    <content type="html">&lt;h2 id=&#34;git&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Git&lt;/span&gt; &lt;a href=&#34;#git&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Hopefully if you write code you are using git, if not go learn the basics of &lt;code&gt;commit&lt;/code&gt;, &lt;code&gt;pull&lt;/code&gt;, &lt;code&gt;push&lt;/code&gt;, and &lt;code&gt;pull request&lt;/code&gt;/&lt;code&gt;merge request&lt;/code&gt; like&amp;hellip; right now.&lt;/p&gt;&#xA;&lt;p&gt;Assuming you are at least familiar with git then you probably work the same way I have since I&amp;rsquo;ve been using it.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;clone or initialize a repo&lt;/li&gt;&#xA;&lt;li&gt;checkout a branch, &lt;code&gt;git checkout -b my-feature&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;work on &lt;code&gt;my-feature&lt;/code&gt; and when ready open a PR into &lt;code&gt;main&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;git pull main&lt;/code&gt; then &lt;code&gt;git checkout -b another-feature&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;etc&amp;hellip;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;What if you need to switch between branches for some reason? Often I&amp;rsquo;m jumping into projects with my co-workers left and right, and I&amp;rsquo;ll have changes that I&amp;rsquo;m either working on or exploring for them.&#xA;When it&amp;rsquo;s time to switch branches I think there&amp;rsquo;s more elegant ways than this but I&amp;rsquo;ve always done this:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;stash&lt;/code&gt; the current changes&lt;/li&gt;&#xA;&lt;li&gt;checkout out the relevant branch&lt;/li&gt;&#xA;&lt;li&gt;helped out&lt;/li&gt;&#xA;&lt;li&gt;re-checkout my original branch&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pop&lt;/code&gt; the &lt;code&gt;stash&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Now, that&amp;rsquo;s not awful but I think &lt;code&gt;worktrees&lt;/code&gt; will make this nicer for a few reasons!&lt;/p&gt;&#xA;&lt;h2 id=&#34;worktrees&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Worktrees&lt;/span&gt; &lt;a href=&#34;#worktrees&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Worktrees are linked branches that have their own directories somewhere on your computer.&#xA;To checkout a branch you don&amp;rsquo;t have to worry about stashing any changes, you just &lt;code&gt;cd&lt;/code&gt; into the directory of that branch.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The branch can be literally anywhere - it doesn&amp;rsquo;t have to be in the repo folder&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;use-case&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Use Case&lt;/span&gt; &lt;a href=&#34;#use-case&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve seen ThePrimeagean argue for worktrees for several reasons, see a YT video &lt;a href=&#34;https://www.youtube.com/watch?v=2uEqYw-N8uE&#34;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m entirely in Python at the moment, or working with projects that dont&amp;rsquo; have that &lt;a href=&#34;/kind/&#34; class=&#34;glossary-term&#34; title=&#34;kind - kubernetes in docker&#34; data-hover-title=&#34;kind&#34;&gt;kind&lt;/a&gt; of requirement (ie. this website).&#xA;My reason for wanting worktrees is 3 fold.&lt;/p&gt;&#xA;&lt;h3 id=&#34;files-that-could-have-been-gitignored-but-ain-t&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Files that could have been gitignored but ain’t&lt;/span&gt; &lt;a href=&#34;#files-that-could-have-been-gitignored-but-ain-t&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;I have a &lt;code&gt;.envrc&lt;/code&gt; I put in every project, but it&amp;rsquo;s not gitignored for reasons that aren&amp;rsquo;t relevant right now&amp;hellip;&#xA;If I switch branches I&amp;rsquo;ll stash everything I have at the time, including my .envrc, but then if I forget to pop the stash and I move on and come back then my environment isn&amp;rsquo;t active and I have to go find the stash, pop it, cd out, and then back in and honestly&amp;hellip;. that sucks.&#xA;Worktrees will let me have the .envrc in every branch, and if I checkout or switch to a new one, my personal branch is unaffected.&lt;/p&gt;&#xA;&lt;h3 id=&#34;symlinks&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Symlinks&lt;/span&gt; &lt;a href=&#34;#symlinks&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In my team&amp;rsquo;s &lt;a href=&#34;https://kedro.readthedocs.io/en/stable/01_introduction/01_introduction.html&#34;&gt;Kedro&lt;/a&gt; workflow we keep a specific directory, the &lt;code&gt;conf&lt;/code&gt; directory at a different spot than the Kedro team has in their templates (the why is outside the scope here).&#xA;The way I preserve every kedro utility for my own benefit is to symlink our &lt;code&gt;conf&lt;/code&gt; to where the Kedro template expects it to be.&#xA;But then everytime I stash changes I lose that symlink so I either just don&amp;rsquo;t have it for the time being or I recreate it which is a hassle&#xA;Worktrees will let me have that present and persistent on all my branches at once.&lt;/p&gt;&#xA;&lt;h3 id=&#34;foo&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Foo&lt;/span&gt; &lt;a href=&#34;#foo&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Because why not!? This workflow feels future-proof, and if my toolset changes down the line then having this worktree centric workflow might be helpful and I&amp;rsquo;m just prepping for that possibility!&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Git ammend to a commit</title>
    <id>https://pype.dev/git-ammend-no-edit/</id>
    <updated>2022-03-04T00:00:00Z</updated>
    <published>2022-03-04T00:00:00Z</published>
    <link href="https://pype.dev/git-ammend-no-edit/" rel="alternate" type="text/html"></link>
    <summary type="text">After carefully staging only lines related to a specific change and comitting I suddenly realized I missed one... darn, what do I do?</summary>
    <content type="html">&lt;p&gt;After carefully staging only lines related to a specific change and comitting I suddenly realized I missed one&amp;hellip; darn, what do I do?&lt;/p&gt;&#xA;&lt;p&gt;Old me would have soft reset my branch to the previous commit and redone all my careful staging&amp;hellip; what a PIA&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;New me (credit: ThePrimeagen)&amp;hellip;&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# stage other changes I missed&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git commit --amend --no-edit&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
</feed>