<?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://waylonwalker.com/tags/git/atom.xml</id>
  <updated>2026-01-15T09:05:21Z</updated>
  <subtitle>All posts with the tag &#34;git&#34;</subtitle>
  <link href="https://waylonwalker.com/tags/git/" rel="alternate" type="text/html"></link>
  <link href="https://waylonwalker.com/tags/git/atom.xml" rel="self" type="application/atom+xml"></link>
  <author>
    <name>Waylon Walker</name>
  </author>
  <generator uri="https://github.com/WaylonWalker/markata-go">markata-go</generator>
  <entry>
    <title>📝 Git Notes</title>
    <id>https://waylonwalker.com/git/</id>
    <updated>2026-01-15T09:05:21Z</updated>
    <published>2026-01-15T09:05:21Z</published>
    <link href="https://waylonwalker.com/git/" rel="alternate" type="text/html"></link>
    <summary type="text">Waylon Walker&#39;s Git Notes</summary>
    <content type="html">&lt;h2 id=&#34;see-old-revisions-of-one-file&#34;&gt;See old revisions of one file &lt;a href=&#34;#see-old-revisions-of-one-file&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&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;git log --oneline -- &amp;lt;file&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git log -n &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; --oneline -- &amp;lt;file&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;checkout-an-old-revision-of-a-file&#34;&gt;Checkout an old revision of a file &lt;a href=&#34;#checkout-an-old-revision-of-a-file&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&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;git checkout &amp;lt;commit&amp;gt; -- path/to/file&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;fuzzy-pick-a-file-and-check-out-an-old-revision&#34;&gt;fuzzy pick a file and check out an old revision &lt;a href=&#34;#fuzzy-pick-a-file-and-check-out-an-old-revision&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&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;cp&#34;&gt;#!/usr/bin/env bash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; -euo pipefail&#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;&lt;span class=&#34;nv&#34;&gt;file&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;:-&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&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;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; -z &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;file&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&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;nv&#34;&gt;file&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;git ls-files &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; fzf --prompt&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;select file &amp;gt; &amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&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;k&#34;&gt;fi&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;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; -z &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;file&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&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;nb&#34;&gt;exit&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&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;k&#34;&gt;fi&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;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; ! git rev-parse --is-inside-work-tree &amp;gt;/dev/null 2&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;1&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&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;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Not a git repository.&amp;#34;&lt;/span&gt; &amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&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;nb&#34;&gt;exit&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&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;k&#34;&gt;fi&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;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; ! git ls-files --error-unmatch -- &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;file&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &amp;gt;/dev/null 2&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;1&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&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;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;File is not tracked by git: &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;file&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&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;nb&#34;&gt;exit&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&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;k&#34;&gt;fi&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;&lt;span class=&#34;nv&#34;&gt;choice&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#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 log --follow --pretty&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;format:&lt;span class=&#34;s1&#34;&gt;&amp;#39;%h %ad %s&amp;#39;&lt;/span&gt; --date&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;short -- &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;file&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#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;    fzf --ansi --no-sort --reverse &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;        --preview-window&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;down:70% &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;        --prompt&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;checkout revision &amp;gt; &amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;        --preview &lt;span class=&#34;s2&#34;&gt;&amp;#34;git show --color=always {1}^..{1} -- &amp;#39;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;file&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#39; 2&amp;gt;/dev/null || git show --color=always {1} -- &amp;#39;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;file&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#39;&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;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&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;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; -z &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;choice&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&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;nb&#34;&gt;exit&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&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;k&#34;&gt;fi&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;&lt;span class=&#34;nv&#34;&gt;commit&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;awk &lt;span class=&#34;s1&#34;&gt;&amp;#39;{print $1}&amp;#39;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;choice&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&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;git checkout &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;commit&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; -- &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;file&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>git name status</title>
    <id>https://waylonwalker.com/git-name-status/</id>
    <updated>2025-12-12T07:53:57Z</updated>
    <published>2025-12-12T07:53:57Z</published>
    <link href="https://waylonwalker.com/git-name-status/" rel="alternate" type="text/html"></link>
    <summary type="text">is a great way to see what files have changed in a git diff alongside the status code. I recently used this in a script to create a report of new and...</summary>
    <content type="html">&lt;p&gt;&lt;code&gt;--name-status&lt;/code&gt; is a great way to see what files have changed in a &lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;git&lt;/a&gt; diff&#xA;alongside the status code.  I recently used this in a script to create a report&#xA;of new and modified files during a build.&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;git diff --name-status&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git diff --name-status origin/main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git diff --name-status --staged&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git diff --name-status &lt;span class=&#34;s1&#34;&gt;&amp;#39;HEAD@{3 days ago}&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>tea login flag</title>
    <id>https://waylonwalker.com/tea-login-flag/</id>
    <updated>2025-11-23T21:09:36Z</updated>
    <published>2025-11-23T21:09:36Z</published>
    <link href="https://waylonwalker.com/tea-login-flag/" rel="alternate" type="text/html"></link>
    <summary type="text">The tea command for gitea (used by forgejo) has a flag for login. With gitea you can have multiple accounts logged in. When you try to run a command such as...</summary>
    <content type="html">&lt;p&gt;The tea command for gitea (used by forgejo) has a flag for login.  With gitea&#xA;you can have multiple accounts logged in.  When you try to run a command such&#xA;as &lt;code&gt;repo create&lt;/code&gt; it will prompt you which login to use, but I learned that you&#xA;can bake it in to all of them with &lt;code&gt;--login &amp;lt;login-name&amp;gt;&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;❯ tea repo create --name deleteme --description &lt;span class=&#34;s1&#34;&gt;&amp;#39;for example&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;┃ NOTE: no gitea login detected, whether falling back to login &lt;span class=&#34;s1&#34;&gt;&amp;#39;git.waylonwalker.com&amp;#39;&lt;/span&gt;?&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;figure&gt;&#xA;&lt;a href=&#34;https://dropper.waylonwalker.com/file/11dc820d-1680-414c-9624-cd970b057a74.webp&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;glightbox&#34; src=&#34;https://dropper.waylonwalker.com/file/11dc820d-1680-414c-9624-cd970b057a74.webp&#34; alt=&#34;image showing message NOTE: no gitea login detected, whether falling back to login ‘git.waylonwalker.com’?&#34;/ data-glightbox=&#34;description: image showing message NOTE: no gitea login detected, whether falling back to login ‘git.waylonwalker.com’?&#34;&gt;&lt;/a&gt;&#xA;&lt;/figure&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;tea repo create --name deleteme --description &lt;span class=&#34;s1&#34;&gt;&amp;#39;for example&amp;#39;&lt;/span&gt; --login git.wayl.one&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>💭 You already have a git server: (Maurycy&#39;s blog)</title>
    <id>https://waylonwalker.com/thought-860/</id>
    <updated>2025-10-29T13:04:20Z</updated>
    <published>2025-10-29T13:04:20Z</published>
    <link href="https://waylonwalker.com/thought-860/" rel="alternate" type="text/html"></link>
    <summary type="text">!https://maurycyz.com/misc/easy_git/</summary>
    <content type="html">&lt;div class=&#34;embed-card embed-card-external&#34;&gt;&#xA;  &lt;a href=&#34;https://maurycyz.com/misc/easy_git/&#34; class=&#34;embed-card-link  has-avatar has-avatar-before&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/maurycyz.com.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/maurycyz.com.ico&#34;&gt;&#xA;    &lt;div class=&#34;embed-card-content&#34;&gt;&#xA;      &lt;div class=&#34;embed-card-title&#34;&gt;You already have a git server: (Maurycy&amp;#39;s blog)&lt;/div&gt;&#xA;      &lt;div class=&#34;embed-card-meta&#34;&gt;maurycyz.com&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;It’s so easy to forget low level tech sometimes.  Things that are dead simple and just work without a hitch.  &lt;code&gt;git&lt;/code&gt; is one of those rock solid things thats very easy to remember all that it does, this is a classic use case.&lt;/p&gt;&#xA;&lt;p&gt;This just works&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;nb&#34;&gt;cd&lt;/span&gt; /parent/directory/for/repo&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone ssh://username@server/path/to/repo&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In order to recieve you must update the remote to allow recieve.&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;git config receive.denyCurrentBranch updateInstead&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now you can pull update push.&lt;/p&gt;&#xA;&lt;p&gt;It’s funny how this was the way I first learned to do Continuous Deployment to a RHEL7 machine, also how Heroku worked, but its so easy to forget this solution is there.  I come across it every few years and immediately have a few use cases in mind.&lt;/p&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 post is a &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34; data-date=&#34;2024-04-01&#34; data-preview=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34;&gt;thought&lt;/a&gt;. It’s a short note that I make&#xA;about someone else’s content online &lt;a href=&#34;/tags/thoughts/&#34; class=&#34;hashtag-tag&#34; data-tag=&#34;thoughts&#34; data-count=&#34;2&#34; data-reading-time=&#34;3&#34; data-reading-time-text=&#34;3 minutes&#34;&gt;#thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>💭 Learn to use email with git!</title>
    <id>https://waylonwalker.com/thought-821/</id>
    <updated>2025-08-29T13:23:08Z</updated>
    <published>2025-08-29T13:23:08Z</published>
    <link href="https://waylonwalker.com/thought-821/" rel="alternate" type="text/html"></link>
    <summary type="text">!https://git-send-email.io/</summary>
    <content type="html">&lt;div class=&#34;embed-card embed-card-external&#34;&gt;&#xA;  &lt;a href=&#34;https://git-send-email.io/&#34; class=&#34;embed-card-link&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &lt;div class=&#34;embed-card-content&#34;&gt;&#xA;      &lt;div class=&#34;embed-card-title&#34;&gt;Learn to use email with git!&lt;/div&gt;&#xA;      &lt;div class=&#34;embed-card-meta&#34;&gt;git-send-email.io&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This site gives us a glimpse into the development workflow using &lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;git&lt;/a&gt; over email, without remote centralized servers.  I found it interesting how patches can be sent with an optional cover letter nearly like a pr would be made.&lt;/p&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 post is a &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34; data-date=&#34;2024-04-01&#34; data-preview=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34;&gt;thought&lt;/a&gt;. It’s a short note that I make&#xA;about someone else’s content online &lt;a href=&#34;/tags/thoughts/&#34; class=&#34;hashtag-tag&#34; data-tag=&#34;thoughts&#34; data-count=&#34;2&#34; data-reading-time=&#34;3&#34; data-reading-time-text=&#34;3 minutes&#34;&gt;#thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>💭 Repository Mirrors | Forgejo – Beyond coding. We forge.</title>
    <id>https://waylonwalker.com/thought-820/</id>
    <updated>2025-08-29T00:50:50Z</updated>
    <published>2025-08-29T00:50:50Z</published>
    <link href="https://waylonwalker.com/thought-820/" rel="alternate" type="text/html"></link>
    <summary type="text">!https://forgejo.org/docs/latest/user/repo-mirror/</summary>
    <content type="html">&lt;div class=&#34;embed-card embed-card-external&#34;&gt;&#xA;  &lt;a href=&#34;https://forgejo.org/docs/latest/user/repo-mirror/&#34; class=&#34;embed-card-link&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &lt;div class=&#34;embed-card-image&#34;&gt;&#xA;      &lt;img class=&#34;glightbox&#34; src=&#34;https://forgejo.org/_astro/og-preview.Uy75QWb0_6Lpd2.webp&#34; alt=&#34;Repository Mirrors | Forgejo – Beyond coding. We forge.&#34; loading=&#34;lazy&#34;/ data-glightbox=&#34;description: Repository Mirrors | Forgejo – Beyond coding. We forge.&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div class=&#34;embed-card-content&#34;&gt;&#xA;      &lt;div class=&#34;embed-card-title&#34;&gt;Repository Mirrors | Forgejo – Beyond coding. We forge.&lt;/div&gt;&#xA;      &lt;div class=&#34;embed-card-meta&#34;&gt;forgejo.org&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Forgejo supports repository mirrors, I think this is how I am going to handle migrating all of my github repos into forgejo.  over time I’ll probably go through and delete a bunch of unnecessary one from github, ones that might have a user or two I might keep on github.  I have such small scale projects with almost no users I am not sure that It really matters for me or not.&lt;/p&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 post is a &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34; data-date=&#34;2024-04-01&#34; data-preview=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34;&gt;thought&lt;/a&gt;. It’s a short note that I make&#xA;about someone else’s content online &lt;a href=&#34;/tags/thoughts/&#34; class=&#34;hashtag-tag&#34; data-tag=&#34;thoughts&#34; data-count=&#34;2&#34; data-reading-time=&#34;3&#34; data-reading-time-text=&#34;3 minutes&#34;&gt;#thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>💭 Let&#39;s Make Sure Github Doesn&#39;t Become the only Option - Edward...</title>
    <id>https://waylonwalker.com/thought-818/</id>
    <updated>2025-08-28T23:45:53Z</updated>
    <published>2025-08-28T23:45:53Z</published>
    <link href="https://waylonwalker.com/thought-818/" rel="alternate" type="text/html"></link>
    <summary type="text">!https://blog.edwardloveall.com/lets-make-sure-github-doesnt-become-the-only-option</summary>
    <content type="html">&lt;div class=&#34;embed-card embed-card-external&#34;&gt;&#xA;  &lt;a href=&#34;https://blog.edwardloveall.com/lets-make-sure-github-doesnt-become-the-only-option&#34; class=&#34;embed-card-link  has-avatar has-avatar-before&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/blog.edwardloveall.com.png&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/blog.edwardloveall.com.png&#34;&gt;&#xA;    &lt;div class=&#34;embed-card-content&#34;&gt;&#xA;      &lt;div class=&#34;embed-card-title&#34;&gt;Let&amp;#39;s Make Sure Github Doesn&amp;#39;t Become the only Option - Edward Loveall&lt;/div&gt;&#xA;      &lt;div class=&#34;embed-card-meta&#34;&gt;blog.edwardloveall.com&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This post is a masterclass in blogging, cross linking, backing up your ideas with posts from other great sources.  I have a week of reading inside this post, and need to come back later when Im not sick.&lt;/p&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 post is a &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34; data-date=&#34;2024-04-01&#34; data-preview=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34;&gt;thought&lt;/a&gt;. It’s a short note that I make&#xA;about someone else’s content online &lt;a href=&#34;/tags/thoughts/&#34; class=&#34;hashtag-tag&#34; data-tag=&#34;thoughts&#34; data-count=&#34;2&#34; data-reading-time=&#34;3&#34; data-reading-time-text=&#34;3 minutes&#34;&gt;#thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>💭 Git Fork vs Git Clone (Animated) - YouTube</title>
    <id>https://waylonwalker.com/thought-358/</id>
    <updated>2024-07-24T17:59:00Z</updated>
    <published>2024-07-24T17:59:00Z</published>
    <link href="https://waylonwalker.com/thought-358/" rel="alternate" type="text/html"></link>
    <summary type="text">!https://www.youtube.com/watch?v=rxh6MhK6Tbs</summary>
    <content type="html">&lt;div class=&#34;embed-card embed-card-external embed-card-provider-youtube&#34;&gt;&#xA;  &lt;div class=&#34;embed-card-rich&#34;&gt;&#xA;&lt;lite-youtube videoid=&#34;rxh6MhK6Tbs&#34; title=&#34;&lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;Git&lt;/a&gt; Fork vs Git Clone&#34; playlabel=&#34;Play: Git Fork vs Git Clone&#34;&gt;&lt;/lite-youtube&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Damn Prime covers this so well from all angles.  Can’t overstate the importance of that last step.  Look at the issues, and raise an issue if there is not one before putting in a bunch of hard work.  Make sure that the maintainers are open for your changes and no one else is already working on it.&lt;/p&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 post is a &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34; data-date=&#34;2024-04-01&#34; data-preview=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34;&gt;thought&lt;/a&gt;. It’s a short note that I make&#xA;about someone else’s content online &lt;a href=&#34;/tags/thoughts/&#34; class=&#34;hashtag-tag&#34; data-tag=&#34;thoughts&#34; data-count=&#34;2&#34; data-reading-time=&#34;3&#34; data-reading-time-text=&#34;3 minutes&#34;&gt;#thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>💭 Some Git poll results</title>
    <id>https://waylonwalker.com/thought-230/</id>
    <updated>2024-03-29T02:04:41Z</updated>
    <published>2024-03-29T02:04:41Z</published>
    <link href="https://waylonwalker.com/thought-230/" rel="alternate" type="text/html"></link>
    <summary type="text">!https://jvns.ca/blog/2024/03/28/git-poll-results/</summary>
    <content type="html">&lt;div class=&#34;embed-card embed-card-external&#34;&gt;&#xA;  &lt;a href=&#34;https://jvns.ca/blog/2024/03/28/git-poll-results/&#34; class=&#34;embed-card-link  has-avatar has-avatar-before&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/jvns.ca.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/jvns.ca.ico&#34;&gt;&#xA;    &lt;div class=&#34;embed-card-content&#34;&gt;&#xA;      &lt;div class=&#34;embed-card-title&#34;&gt;Some Git poll results&lt;/div&gt;&#xA;      &lt;div class=&#34;embed-card-description&#34;&gt;Some Git poll results&lt;/div&gt;&#xA;      &lt;div class=&#34;embed-card-meta&#34;&gt;Julia Evans · jvns.ca&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;great poll of &lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;git&lt;/a&gt; questions&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;poll: did you know that in a git merge conflict, the order of the code is different when you do a merge/rebase?&lt;/p&gt;&#xA;&lt;p&gt;merge:&lt;/p&gt;&#xA;&lt;h1 id=&#34;your-code&#34;&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; HEAD&#xA;YOUR CODE&lt;/h1&gt;&#xA;&lt;p&gt;OTHER BRANCH’S CODE&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;c694cf8aabe&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;rebase:&lt;/p&gt;&#xA;&lt;h1 id=&#34;other-branchs-code&#34;&gt;«««&amp;lt; HEAD&#xA;OTHER BRANCH’S CODE&lt;/h1&gt;&#xA;&lt;p&gt;YOUR CODE&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;d945752 (your commit message)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This one explains a lot.  I &lt;em&gt;think&lt;/em&gt; I knew this, I might have seen it somewhere, but I have definitely noticed it go both ways and confuse the crap out of me.  Feels very similar to how &lt;code&gt;--ours&lt;/code&gt; and &lt;code&gt;--theirs&lt;/code&gt; flip flops.&lt;/p&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 post is a &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34; data-date=&#34;2024-04-01&#34; data-preview=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34;&gt;thought&lt;/a&gt;. It’s a short note that I make&#xA;about someone else’s content online &lt;a href=&#34;/tags/thoughts/&#34; class=&#34;hashtag-tag&#34; data-tag=&#34;thoughts&#34; data-count=&#34;2&#34; data-reading-time=&#34;3&#34; data-reading-time-text=&#34;3 minutes&#34;&gt;#thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Two new shell aliases for git</title>
    <id>https://waylonwalker.com/two-new-aliases-for-git/</id>
    <updated>2022-06-28T12:31:10Z</updated>
    <published>2022-06-28T12:31:10Z</published>
    <link href="https://waylonwalker.com/two-new-aliases-for-git/" rel="alternate" type="text/html"></link>
    <summary type="text">Recently I added two new bash/zsh aliases to make my git experience just a tad better.</summary>
    <content type="html">&lt;figure&gt;&#xA;&lt;a href=&#34;https://stable-diffusion.waylonwalker.com/000172.3260819219.webp&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;glightbox&#34; src=&#34;https://stable-diffusion.waylonwalker.com/000172.3260819219.webp&#34; alt=&#34;Astronaut doing a mic drop with explosion&#34;/ data-glightbox=&#34;description: Astronaut doing a mic drop with explosion&#34;&gt;&lt;/a&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;Recently I added two new bash/zsh aliases to make my &lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;git&lt;/a&gt; experience just a tad&#xA;better.&lt;/p&gt;&#xA;&lt;h2 id=&#34;trackme&#34;&gt;trackme &lt;a href=&#34;#trackme&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Most of our work repos were recently migrated to new remote urls, we scriped&#xA;out the update to all of the repos, but I was left with a tracking error for&#xA;all of my open branches.  To easily resolve this I just made an alias so that I&#xA;can just run &lt;code&gt;trackme&lt;/code&gt; anytime I see this error.&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;There is no tracking information for the current branch.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    Please specify which branch you want to merge with.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    See git-pull(1) for details&#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;    git pull &amp;lt;remote&amp;gt; &amp;lt;branch&amp;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;If you wish to set tracking information for this branch you can do so with:&#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;    git branch --set-upstream develop origin/&amp;lt;branch&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;getting-the-branch&#34;&gt;getting the branch &lt;a href=&#34;#getting-the-branch&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;The following command will always return the currently checked out branch name.&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;git symbolic-ref --short HEAD&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Injecting this into the suggested &lt;code&gt;git&lt;/code&gt; command as a subshell gives us this&#xA;alias that when ran with &lt;code&gt;trackme&lt;/code&gt; will automatically fix tracking for my&#xA;branch.&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;nb&#34;&gt;alias&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;trackme&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;git branch --set-upstream-to=origin/$(git symbolic-ref --short HEAD)&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;rebasemain&#34;&gt;rebasemain &lt;a href=&#34;#rebasemain&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I sometimes get a bit lazy at checking main for changes before submitting any&#xA;prs, so again I made a quick shell alias that will rebase main into my branch&#xA;before I open a pr.&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;nb&#34;&gt;alias&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;rebasemain&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;git pull origin main --rebase&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;the-aliases&#34;&gt;The Aliases &lt;a href=&#34;#the-aliases&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Here are both of the alias’s, feel free to steal and modify them into your&#xA;dotfiles.  If you are uniniatiated a common starting place to put these is&#xA;either in your &lt;code&gt;~/.bashrch&lt;/code&gt; or &lt;code&gt;~/.zshrc&lt;/code&gt; depending on your shell of choice.&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;nb&#34;&gt;alias&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;trackme&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;git branch --set-upstream-to=origin/$(git symbolic-ref --short HEAD)&amp;#39;&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;nb&#34;&gt;alias&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;rebasemain&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;git pull origin main --rebase&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>gh repo create</title>
    <id>https://waylonwalker.com/gh-repo-create/</id>
    <updated>2022-06-10T11:53:32Z</updated>
    <published>2022-06-10T11:53:32Z</published>
    <link href="https://waylonwalker.com/gh-repo-create/" rel="alternate" type="text/html"></link>
    <summary type="text">I love getting faster in my workflow, something I have recently added in is creating GitHub repos with the cli. I often create little examples of projects,...</summary>
    <content type="html">&lt;p&gt;I love getting faster in my workflow, something I have recently added in is&#xA;creating GitHub repos with the cli.  I often create little examples of&#xA;projects, but they just end up on my machine and not anywhere that someone else&#xA;can see, mostly because it takes more effort to go create a repo.  TIL you can&#xA;create a repo right from the command line and push to it immediately.&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;gh repo create waylonwalker-cli&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;figure&gt;&#xA;&lt;a href=&#34;https://dropper.waylonwalker.com/api/file/3a889b2a-d83f-4f42-a849-1c34b8e6365c.webp&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;glightbox&#34; src=&#34;https://dropper.waylonwalker.com/api/file/3a889b2a-d83f-4f42-a849-1c34b8e6365c.webp&#34; alt=&#34;gh-repo-create.webp&#34;/ data-glightbox=&#34;description: gh-repo-create.webp&#34;&gt;&lt;/a&gt;&#xA;&lt;/figure&gt;&#xA;&lt;h2 id=&#34;want-to-see-what-this-repo-i-created-is-about&#34;&gt;want to see what this repo I created is about? &lt;a href=&#34;#want-to-see-what-this-repo-i-created-is-about&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Check out what I created here.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;pipx run waylonwalker&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>git merge ours</title>
    <id>https://waylonwalker.com/git-merge-ours/</id>
    <updated>2022-05-24T12:12:09Z</updated>
    <published>2022-05-24T12:12:09Z</published>
    <link href="https://waylonwalker.com/git-merge-ours/" rel="alternate" type="text/html"></link>
    <summary type="text">Sometimes you have a pretty old branch you are trying to merge into and you are absolutely sure what you have is what you want, and therefore you don&#39;t want...</summary>
    <content type="html">&lt;p&gt;Sometimes you have a pretty old branch you are trying to merge into and you are&#xA;absolutely sure what you have is what you want, and therefore you don’t want to&#xA;deal with any sort of merge conflicts, you would rather just tell &lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;git&lt;/a&gt; to use my&#xA;version and move on.&lt;/p&gt;&#xA;&lt;h2 id=&#34;update-main&#34;&gt;update main &lt;a href=&#34;#update-main&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The first step is to make sure your local copy of the branch you are moving&#xA;into is up to date.&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;git checkout main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git pull&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;update-your-feature-branch&#34;&gt;update your feature branch &lt;a href=&#34;#update-your-feature-branch&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;It’s also worth updating your feature branch before doing the merge. Maybe you&#xA;have teammates that have updated the repo, or you popped in a quick change from&#xA;the web ui. It’s simple and worth checking.&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;git checkout my-feature&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git pull&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;start-the-merge&#34;&gt;start the merge &lt;a href=&#34;#start-the-merge&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Merge the changes from main into &lt;code&gt;my-feature&lt;/code&gt; branch.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git merge main&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now is where the merge conflict may have started. If you are completely sure&#xA;that your copy is correct you can &lt;code&gt;--ours&lt;/code&gt;, if you are completely sure that&#xA;&lt;code&gt;main&lt;/code&gt; is correct, you can &lt;code&gt;--theirs&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git checkout --ours .&#xA;git merge --continue&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This will pop open your configured &lt;code&gt;git.core.editor&lt;/code&gt; or &lt;code&gt;$EDTIOR&lt;/code&gt;. If you have&#xA;not configured your editor, it will default to vim.  Close vim with &lt;code&gt;&amp;lt;escape&amp;gt;:x&lt;/code&gt;, accepting the&#xA;merge message.&lt;/p&gt;&#xA;&lt;p&gt;Now push your changes that do not clash with main and finish your pr.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git push&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>List all git commits with GitPython</title>
    <id>https://waylonwalker.com/git-python-all-commits/</id>
    <updated>2022-05-09T21:24:12Z</updated>
    <published>2022-05-09T21:24:12Z</published>
    <link href="https://waylonwalker.com/git-python-all-commits/" rel="alternate" type="text/html"></link>
    <summary type="text">I am getting ready to do some timeseries analysis on a git repo with python, my first step is to figure out a way to list all of the git commits so that I...</summary>
    <content type="html">&lt;p&gt;I am getting ready to do some timeseries analysis on a &lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;git&lt;/a&gt; repo with python, my&#xA;first step is to figure out a way to list all of the git commits so that I can&#xA;analyze each one however I want.  The GitPython library made this almost&#xA;trivial once I realized how.&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;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Repo&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;&lt;span class=&#34;n&#34;&gt;repo&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Repo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;.&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#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;n&#34;&gt;commits&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;repo&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;iter_commits&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This returns a generator, if you are iterating over them this is likely what&#xA;you want.&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;n&#34;&gt;commits&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;c1&#34;&gt;# &amp;lt;generator object Commit._iter_from_process_or_stream at 0x7f3307584510&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The generator will return &lt;code&gt;git.Commit&lt;/code&gt; objects with lots of information about&#xA;each commit such as &lt;code&gt;hexsha&lt;/code&gt;, &lt;code&gt;author&lt;/code&gt;, &lt;code&gt;commited_datetime&lt;/code&gt;, &lt;code&gt;gpgsig&lt;/code&gt;, and&#xA;&lt;code&gt;message&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;&lt;span class=&#34;nb&#34;&gt;next&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;commits&lt;/span&gt;&lt;span class=&#34;p&#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;c1&#34;&gt;# &amp;lt;git.Commit &amp;#34;d125317892d0fab10a36638a2d23356ba25c5621&amp;#34;&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>GPG signing commits over ssh</title>
    <id>https://waylonwalker.com/gpg-sign-git-ssh/</id>
    <updated>2022-05-08T15:09:59Z</updated>
    <published>2022-05-08T15:09:59Z</published>
    <link href="https://waylonwalker.com/gpg-sign-git-ssh/" rel="alternate" type="text/html"></link>
    <summary type="text">I was editing some blog posts over ssh, when I ran into this error. gpg was failing to sign my commits. I realized that this was because I could not answer...</summary>
    <content type="html">&lt;p&gt;I was editing some blog posts over ssh, when I ran into&#xA;this error.  gpg was failing to sign my commits.  I&#xA;realized that this was because I could not answer to the&#xA;desktop keyring over ssh, but had no idea how to fix it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;error&#34;&gt;Error &lt;a href=&#34;#error&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;This is the error message I was seeing.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;gpg failed to sign the data ssh&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;the-fix&#34;&gt;The fix &lt;a href=&#34;#the-fix&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The fix ended up being pretty simple, but quite a ways down this &lt;a href=&#34;https://stackoverflow.com/questions/41052538/git-error-gpg-failed-to-sign-data/41054093&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/stackoverflow.com.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/stackoverflow.com.ico&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;stack overflow post&lt;/a&gt;.&#xA;This environment variable tells gpg that we are not logged&#xA;into a desktop and it does not try to use the desktop&#xA;keyring, and asks to unlog the gpgkey right in the&#xA;terminal.&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;nb&#34;&gt;export&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;GPG_TTY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;tty&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;the-log-in-menu&#34;&gt;The log in menu &lt;a href=&#34;#the-log-in-menu&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;This is what it looks like when it asks for the passphrase.&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&lt;a href=&#34;https://images.waylonwalker.com/gpg-passphrase-unlock.png&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;glightbox&#34; src=&#34;https://images.waylonwalker.com/gpg-passphrase-unlock.png&#34; alt=&#34;enter your passphrase to unlock your gpg key&#34;/ data-glightbox=&#34;description: enter your passphrase to unlock your gpg key&#34;&gt;&lt;/a&gt;&#xA;&lt;/figure&gt;&#xA;&lt;h2 id=&#34;edit-another-way&#34;&gt;EDIT-another way &lt;a href=&#34;#edit-another-way&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;So this did not fix the issue on Arch BTW, and I have seen it not work for wsl&#xA;users either.  This did work for me and reported to have worked by a wsl user&#xA;on a github issue.&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;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; gpg --clearsign&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will unlock the gpg key then let you commit.&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Review Pull Requests with git worktrees</title>
    <id>https://waylonwalker.com/review-pull-requests-with-git-worktrees/</id>
    <updated>2022-05-04T14:31:05Z</updated>
    <published>2022-05-04T14:31:05Z</published>
    <link href="https://waylonwalker.com/review-pull-requests-with-git-worktrees/" rel="alternate" type="text/html"></link>
    <summary type="text">Sometimes you get a PR on a project, but cannot review it without wrecking your current working setup. This might be because it needs to be compiled, or a...</summary>
    <content type="html">&lt;p&gt;Sometimes you get a PR on a project, but cannot review it without wrecking your&#xA;current working setup.  This might be because it needs to be compiled, or a new&#xA;set of requirements.  &lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;Git&lt;/a&gt; worktrees is a great way to chekout the remote branch&#xA;in a completely separate directory to avoid changing any files in your current&#xA;project.&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;# pattern&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;c1&#34;&gt;# git worktree add -b &amp;lt;branch-name&amp;gt; &amp;lt;PATH&amp;gt; &amp;lt;remote&amp;gt;/&amp;lt;branch-name&amp;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 worktree add -b fix-aws-service-cnsn /tmp/project origin/fix-aws-service-cnsn&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will create a new directory &lt;code&gt;/tmp/project&lt;/code&gt; that you can review the branch&#xA;&lt;code&gt;fix-aws-service-cnsn&lt;/code&gt; from the remote &lt;code&gt;origin&lt;/code&gt;.  If you have setup different remotes locally you can check for the name of it with &lt;code&gt;git remote -v&lt;/code&gt;&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Using Git from Python</title>
    <id>https://waylonwalker.com/python-git/</id>
    <updated>2022-04-30T20:23:23Z</updated>
    <published>2022-04-30T20:23:23Z</published>
    <link href="https://waylonwalker.com/python-git/" rel="alternate" type="text/html"></link>
    <summary type="text">is a python api for your git repos, it can be quite handy when you need to work with git from python.</summary>
    <content type="html">&lt;p&gt;&lt;code&gt;GitPython&lt;/code&gt; is a python api for your &lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;git&lt;/a&gt; repos, it can be quite handy when you&#xA;need to work with git from python.&lt;/p&gt;&#xA;&lt;h2 id=&#34;use-case&#34;&gt;Use Case &lt;a href=&#34;#use-case&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I recently made myself a handy tool for making screenshots in python and it&#xA;need to do a git commit and push from within the script.  For this I reached&#xA;for &lt;code&gt;GitPython&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;/screenshot-to-blog/&#34; class=&#34;wikilink&#34; data-title=&#34;How I Quickly Capture Screenshots directly into My Blog&#34; data-description=&#34;When I am creating blog posts it&amp;#39;s often helpful to add screenshots to them to illustrate what I see on my screen. Sometimes I lack good screenshots in my...&#34; data-date=&#34;2022-04-30&#34; data-preview=&#34;When I am creating blog posts it&amp;#39;s often helpful to add screenshots to them to illustrate what I see on my screen. Sometimes I lack good screenshots in my...&#34;&gt;How I Quickly Capture Screenshots directly into My Blog&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;installation&#34;&gt;Installation &lt;a href=&#34;#installation&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;GitPython&lt;/code&gt; is a python library hosted on pypi that we will want to install&#xA;into our virtual environments using pip.&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;n&#34;&gt;pip&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;install&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;GitPython&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;create-a-repo-object&#34;&gt;Create a Repo Object &lt;a href=&#34;#create-a-repo-object&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Import Repo from the git library and create an instance of the &lt;code&gt;Repo&lt;/code&gt; object by&#xA;giving it a path to the directory containing your &lt;code&gt;.git&lt;/code&gt; directory.&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;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Repo&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;n&#34;&gt;repo&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Repo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;~/git/waylonwalker.com/&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;two-interfaces&#34;&gt;Two interfaces &lt;a href=&#34;#two-interfaces&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;from the docs&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;It provides abstractions of git objects for easy access of repository data,&#xA;and additionally allows you to access the git repository more directly using&#xA;either a pure python implementation, or the faster, but more resource&#xA;intensive git command implementation.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I only needed to use the more intensive but familar to me git command&#xA;implementation to get me project off the ground.  There is a good&#xA;&lt;a href=&#34;https://gitpython.readthedocs.io/en/stable/tutorial.html#tutorial-label&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/gitpython.readthedocs.io.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/gitpython.readthedocs.io.ico&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;tutorial&lt;/a&gt;&#xA;to get you started with their pure python implementation in their docs.&lt;/p&gt;&#xA;&lt;h2 id=&#34;status&#34;&gt;Status &lt;a href=&#34;#status&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Requesting the git status can be done as follows.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;note I have prefixed my commands with »&amp;gt; to distinguish between the command&#xA;I entered and the output.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; print(repo.git.status())&#xA;&#xA;On branch main&#xA;Your branch is ahead of &amp;#39;origin/main&amp;#39; by 1 commit.&#xA;  (use &amp;#34;git push&amp;#34; to publish your local commits)&#xA;&#xA;Untracked files:&#xA;  (use &amp;#34;git add &amp;lt;file&amp;gt;...&amp;#34; to include in what will be committed)&#xA;        blog/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;You can even pass in flags that you would pass into the cli.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; print(repo.git.status(&amp;#34;-s&amp;#34;))&#xA;?? blog/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;log&#34;&gt;log &lt;a href=&#34;#log&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Example of using the log.&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;nb&#34;&gt;print&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;repo&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;git&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;log&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;--oneline&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;--graph&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#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;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;d28bd8&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;fix&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;broken&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;image&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;link&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; &lt;span class=&#34;mi&#34;&gt;3573928&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;wip&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;screenshot&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;to&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;blog&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; &lt;span class=&#34;n&#34;&gt;fed9abc&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;wip&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;screenshot&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;to&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;blog&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; &lt;span class=&#34;n&#34;&gt;d383780&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;update&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;wsl2&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; &lt;span class=&#34;n&#34;&gt;ad72b14&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;wip&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;screenshot&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;to&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;blog&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; &lt;span class=&#34;mi&#34;&gt;144&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;c2f3&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;gratitude&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;180&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;find-deleted-files&#34;&gt;Find Deleted Files &lt;a href=&#34;#find-deleted-files&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;We can even do things like find all files that have been deleted and the hash&#xA;they were deleted.&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;nb&#34;&gt;print&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;repo&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;git&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;log&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;--diff-filter&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;D&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;--name-only&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;--pretty=format:&amp;#34;%h&amp;#34;&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a href=&#34;/git-find-deleted-files/&#34; class=&#34;wikilink&#34; data-title=&#34;git find deleted files&#34; data-description=&#34;It&amp;#39;s nearly impossible to completely loose a file if it is commited to git. It&amp;#39;s likely harder to fully remove the file than it is to recover it, but how do...&#34; data-date=&#34;2022-02-28&#34; data-preview=&#34;It&amp;#39;s nearly impossible to completely loose a file if it is commited to git. It&amp;#39;s likely harder to fully remove the file than it is to recover it, but how do...&#34;&gt;git find deleted files&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;full post on finding deleted files&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;my-experience&#34;&gt;My Experience &lt;a href=&#34;#my-experience&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;This library seemed pretty straightforward and predicatable once I realized&#xA;there were two main implementations and that I would already be familar with&#xA;the more intensive git command implementation.&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Set Your Git Pager Config</title>
    <id>https://waylonwalker.com/git-pager/</id>
    <updated>2022-03-16T14:03:18Z</updated>
    <published>2022-03-16T14:03:18Z</published>
    <link href="https://waylonwalker.com/git-pager/" rel="alternate" type="text/html"></link>
    <summary type="text">Setting up your git pager to your liking can help you navigate diffs and logs much more efficiently. You can set it to whatever pager you like so that your...</summary>
    <content type="html">&lt;p&gt;Setting up your &lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;git&lt;/a&gt; pager to your liking can help you navigate diffs and logs&#xA;much more efficiently.  You can set it to whatever pager you like so that your&#xA;keys feel nice and smooth and your fingers know exactly what to do.  You might&#xA;even gain a few extra features.&lt;/p&gt;&#xA;&lt;h2 id=&#34;setting-the-pager&#34;&gt;Setting the pager &lt;a href=&#34;#setting-the-pager&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;You can set the pager right from your command line with the following command.&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;git config --global core.pager &lt;span class=&#34;s1&#34;&gt;&amp;#39;more&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can also set your pager by editing your global &lt;code&gt;.gitconfig&lt;/code&gt; file which by&#xA;default is set to &lt;code&gt;~/.gitconfig&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;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;core&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;nv&#34;&gt;pager&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; more&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;color&#34;&gt;Color &lt;a href=&#34;#color&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;In my experience you need to turn colors off with nvim.  bat handles them and&#xA;looks good either way, but nvim will be plain white and display the color&#xA;codes as plain text if color is on.&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;git config --global color.pager no&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;pagers-i-have-tried&#34;&gt;Pagers I have tried &lt;a href=&#34;#pagers-i-have-tried&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Here are some various configs that I tried.  For some reason line numbers in&#xA;bat really bothered me, but when in nvim they felt ok.  I am going to try&#xA;running both of them for a few days and see which I like better.  I think&#xA;having some of my nvim config could be really handy for things like yanking a&#xA;commit hash to the system clipboard without touching the mouse.&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;# bat&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 config --global core.pager &lt;span class=&#34;s1&#34;&gt;&amp;#39;bat&amp;#39;&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;&lt;span class=&#34;c1&#34;&gt;# nvim in read only mode&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 config --global core.pager &lt;span class=&#34;s1&#34;&gt;&amp;#39;nvim -R&amp;#39;&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;&lt;span class=&#34;c1&#34;&gt;# turn colors off&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 config --global color.pager no&#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;&lt;span class=&#34;c1&#34;&gt;# bat with no line numbers&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 config --global core.pager &lt;span class=&#34;s1&#34;&gt;&amp;#39;bat --style=plain&amp;#39;&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;&lt;span class=&#34;c1&#34;&gt;# nvim with no line numbers and a specific rc file&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 config --global core.pager &lt;span class=&#34;s2&#34;&gt;&amp;#34;nvim -R +&amp;#39;set nonumber norelativenumber&amp;#39; -u ~/.config/nvim/init-git.vim&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;reset-back-to-the-default&#34;&gt;reset back to the default &lt;a href=&#34;#reset-back-to-the-default&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;If you are afraid to try one of these settings, don’t be you can always change&#xA;it back.  If you tried one and dont like it just &lt;code&gt;--unset&lt;/code&gt; the config that you&#xA;just tried.&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;git config --global --unset core.pager&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git config --global --unset color.pager&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The other option you have is to open your &lt;code&gt;.gitconfig&lt;/code&gt; file and delete the&#xA;lines of config that set your pager.&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Configure Git to Autocorrect Your Fat Fingers</title>
    <id>https://waylonwalker.com/git-config-help-autocorrect/</id>
    <updated>2022-03-15T00:43:25Z</updated>
    <published>2022-03-15T00:43:25Z</published>
    <link href="https://waylonwalker.com/git-config-help-autocorrect/" rel="alternate" type="text/html"></link>
    <summary type="text">If you have ever mistyped a git command very close to an existing one you have likely seen this message.</summary>
    <content type="html">&lt;p&gt;If you have ever mistyped a &lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;git&lt;/a&gt; command very close to an existing one&#xA;you have likely seen this message.&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;❯ git chekout dev&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git: &lt;span class=&#34;s1&#34;&gt;&amp;#39;chekout&amp;#39;&lt;/span&gt; is not a git command. See &lt;span class=&#34;s1&#34;&gt;&amp;#39;git --help&amp;#39;&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;The most similar &lt;span class=&#34;nb&#34;&gt;command&lt;/span&gt; is&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        checkout&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;automatically-run-the-right-one&#34;&gt;Automatically run the right one &lt;a href=&#34;#automatically-run-the-right-one&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;What you might not have known is that you can configure git to just run&#xA;this command for you.&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;# Gives you 0.1 seconds to respond&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 config --global help.autocorrect &lt;span class=&#34;m&#34;&gt;1&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;&lt;span class=&#34;c1&#34;&gt;# Gives you 1 seconds to respond&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 config --global help.autocorrect &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;&lt;span class=&#34;c1&#34;&gt;# Gives you 5 seconds to respond&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 config --global help.autocorrect &lt;span class=&#34;m&#34;&gt;50&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;fat-fingers-gone&#34;&gt;Fat Fingers Gone &lt;a href=&#34;#fat-fingers-gone&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Now when you typo a git command it will autmatically run after the&#xA;configured number of tenths of a second.&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;❯ git chkout get-error&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;WARNING: You called a Git &lt;span class=&#34;nb&#34;&gt;command&lt;/span&gt; named &lt;span class=&#34;s1&#34;&gt;&amp;#39;chkout&amp;#39;&lt;/span&gt;, which does not exist.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Continuing in 1.0 seconds, assuming that you meant &lt;span class=&#34;s1&#34;&gt;&amp;#39;checkout&amp;#39;&lt;/span&gt;.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;M       pages/blog/how-i-deploy-2021.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;M       pages/hot_tips/001.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;M       pages/templates/gratitude_card.html&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;M       plugins/index.py&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;M       plugins/publish_amp.py&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;M       plugins/render_template_variables.py&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;M       plugins/youtube.py&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;M       requirements.txt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;M       static/index.html&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Switched to branch &lt;span class=&#34;s1&#34;&gt;&amp;#39;get-error&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;my-config&#34;&gt;My config &lt;a href=&#34;#my-config&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I’m rocking 10 for now just to see how I feel about it, but honestly I&#xA;cannot think of a time that I have seen the original warning that was&#xA;not what I wanted.  This at least gives me some time to respond if I am&#xA;unsure.&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;git config --global help.autocorrect &lt;span class=&#34;m&#34;&gt;10&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Git Worktrees are not so Scary</title>
    <id>https://waylonwalker.com/git-checkout-worktree/</id>
    <updated>2022-03-10T19:19:34Z</updated>
    <published>2022-03-10T19:19:34Z</published>
    <link href="https://waylonwalker.com/git-checkout-worktree/" rel="alternate" type="text/html"></link>
    <summary type="text">So worktrees, I always thought they were a big scary things. Turns out they are much simpler than I thought.</summary>
    <content type="html">&lt;p&gt;So worktrees, I always thought they were a big scary things.  Turns out they&#xA;are much simpler than I thought.&lt;/p&gt;&#xA;&lt;h2 id=&#34;myth-1&#34;&gt;Myth #1 &lt;a href=&#34;#myth-1&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;no special setup&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;I thought you had to be all in or worktrees or normal &lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;git&lt;/a&gt;, but not both.  When&#xA;I see folks go all in on worktrees they start with a bare repo, while its true&#xA;this is the way you go all in, its not true that this is required.&lt;/p&gt;&#xA;&lt;h2 id=&#34;lets-make-a-worktree&#34;&gt;Lets make a worktree &lt;a href=&#34;#lets-make-a-worktree&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Making a worktree is as easy as making a branch.  It’s actually just a branch&#xA;that lives in another place in your filesystem.&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;# checkout a new worktree called compare based on main in /tmp/project&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 worktree add -b compare /tmp/project 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;&lt;span class=&#34;c1&#34;&gt;# checkout a new worktree called compare based on HEAD in /tmp/project&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 worktree add -b compare /tmp/project&#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;&lt;span class=&#34;c1&#34;&gt;# checkout a worktree from an existing feature branch in /tmp/project&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 worktree add /tmp/project my-existing-feature-branch&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;blockquote&gt;&#xA;&lt;p&gt;The worktree that you create is considered a &lt;em&gt;linked worktree&lt;/em&gt;, while the&#xA;original worktree is called the &lt;em&gt;main worktree&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Note that I put this in my tmp directory because I don’t expect it to live very&#xA;long, my recent use case was to compare two files after a big formatting&#xA;change.  You put these where you want, but dont come at me when your /tmp gets&#xA;wiped and you loose work.&lt;/p&gt;&#xA;&lt;h2 id=&#34;myth-2&#34;&gt;Myth #2 &lt;a href=&#34;#myth-2&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;they are hidden mysterious creatures&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Just like branches git has some nice commands to help us understand what&#xA;worktrees we have on our system.  Firstly we have something very specific to&#xA;worktrees to list them out.&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;git worktree list&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;gives the output&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;/home/u_walkews/git/git-work-play  b202442 &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;main&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;/tmp/another                       d9b2cf1 &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;another&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Even the branch command gives a bit different output for a worktree.&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;git branch&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;gives this output, notice the + denotes an actively linked worktree, and the *&#xA;gives the active branch.  If you cd over to the worktree directory, these will&#xA;switch roles.&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;+ another&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  just-a-branch&#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;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;you-can-only-checkout-a-branch-in-one-place&#34;&gt;You can only checkout a branch in one place &lt;a href=&#34;#you-can-only-checkout-a-branch-in-one-place&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;If you try to checkout a branch that is checked out in a linked worktree, you&#xA;will be presented with an error, and it will not let you check out a second&#xA;copy of that branch.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;❯ git checkout another&#xA;fatal: &amp;#39;another&amp;#39; is already checked out at &amp;#39;/tmp/another&amp;#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;myth-3&#34;&gt;Myth #3 &lt;a href=&#34;#myth-3&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;once you go worktree, you worktree&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once you have worktrees on your system, you have a few ways to get rid of them.&#xA;Using git’s way feels much superior, but if your a doof like me and didn’t read&#xA;the manual before you &lt;code&gt;rm /tmp/another -rf&lt;/code&gt; you will notice that the worktree&#xA;is still active.  If you run &lt;code&gt;git worktree prune&lt;/code&gt; it will clean that right up.&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;git worktree remove another&#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;rm /tmp/another&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git worktree prune&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;it-wont-let-you-remove-if-you-have-changes&#34;&gt;It won’t let you remove if you have changes &lt;a href=&#34;#it-wont-let-you-remove-if-you-have-changes&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;This makes me think that &lt;code&gt;remove&lt;/code&gt; is a much safer option.  If you have&#xA;uncommitted changes, &lt;code&gt;git worktree remove&lt;/code&gt; will throw an error, and make you&#xA;commit or use &lt;code&gt;--force&lt;/code&gt; to remove the worktree.&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;❯ git worktree remove another&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fatal: &lt;span class=&#34;s1&#34;&gt;&amp;#39;another&amp;#39;&lt;/span&gt; contains modified or untracked files, use --force to delete it&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;rtfm&#34;&gt;RTFM &lt;a href=&#34;#rtfm&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;read the friendly manual&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;There is a ton more information in the man page for worktrees, these are just&#xA;the parts that seemed really useful to me out of the gate.&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;man git worktree&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Configure Git to Always Push to the Current Branch</title>
    <id>https://waylonwalker.com/git-push-default-current/</id>
    <updated>2022-03-09T13:45:18Z</updated>
    <published>2022-03-09T13:45:18Z</published>
    <link href="https://waylonwalker.com/git-push-default-current/" rel="alternate" type="text/html"></link>
    <summary type="text">Has no upstream branch errors in git can be such a damn productivity killer. You gotta stop your flow and swap over the branch, there is a config so that you...</summary>
    <content type="html">&lt;p&gt;Has no upstream branch errors in &lt;a href=&#34;/glossary/git/&#34; class=&#34;glossary-term&#34; title=&#34;Git is a version control system for tracking changes in source code during software development. In the beginning there were many, some were licensed. As...&#34;&gt;git&lt;/a&gt; can be such a damn productivity killer.&#xA;You gotta stop your flow and swap over the branch, there is a config so that&#xA;you don’t have to do this.&lt;/p&gt;&#xA;&lt;h2 id=&#34;fatal-has-no-upstream-branch&#34;&gt;&lt;strong&gt;fatal&lt;/strong&gt; has no upstream branch &lt;a href=&#34;#fatal-has-no-upstream-branch&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;If you have not yet configured git to always push to the current branch, you&#xA;will get a &lt;code&gt;has no upstream branch&lt;/code&gt; error if you don’t explicitly set it.&lt;/p&gt;&#xA;&lt;p&gt;Let’s show an example&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;git checkout -b feat/ingest-inventory-data&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git add conf/base/catalog.yml&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;feat: ingest inventory data from abc-db&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;git push&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You will be presented with the following error.&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;fatal: The current branch feat/ingest-inventory-data has no upstream branch.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;To push the current branch and &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; the remote as upstream, use&#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;    git push --set-upstream origin feat/ingest-inventory-data&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;option-1-follow-the-instructions&#34;&gt;Option 1: follow the instructions &lt;a href=&#34;#option-1-follow-the-instructions&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;To resolve this fatal error your first option is simply to follow the&#xA;instructions given.  Just copy and paste it 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;git push --set-upstream origin feat/ingest-inventory-data&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;option-2-push-to-the-current-branch-without-setting-upstream&#34;&gt;Option 2: push to the current branch without setting upstream &lt;a href=&#34;#option-2-push-to-the-current-branch-without-setting-upstream&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Honestly, I am pretty aware of the branch I am on, and Very few times have I&#xA;ever accidentally pushed to the wrong branch.  The one that you might have a&#xA;bigger chance with a more detrimental effect is &lt;code&gt;main&lt;/code&gt;, which I will argue you&#xA;should have blocked to require a passing &lt;code&gt;ci&lt;/code&gt;, and potential reviewers to&#xA;merge in.  Therefore you can’t even push to &lt;code&gt;main&lt;/code&gt; anyway.&lt;/p&gt;&#xA;&lt;p&gt;To just push to the branch you are currently on each and every time and never&#xA;see this error again, you can run this to configure git to always push to your&#xA;current branch.&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;git config --global push.default current&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
</feed>