<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/atom.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:fh="http://purl.org/syndication/history/1.0">
  <title>Posts tagged: git Archive</title>
  <id>https://go.waylonwalker.com/tags/git/archive/atom.xml</id>
  <updated>2026-01-15T09:05:21Z</updated>
  <subtitle>All posts with the tag &#34;git&#34;</subtitle>
  <link href="https://go.waylonwalker.com/tags/git/" rel="alternate" type="text/html"></link>
  <link href="https://go.waylonwalker.com/tags/git/archive/atom.xml" rel="self" type="application/atom+xml"></link>
  <link href="https://go.waylonwalker.com/tags/git/atom.xml" rel="current" type="application/atom+xml"></link>
  <author>
    <name>Waylon Walker</name>
  </author>
  <generator uri="https://github.com/WaylonWalker/markata-go">markata-go</generator>
  <fh:complete></fh:complete>
  <entry>
    <title>📝 Git Notes</title>
    <id>https://go.waylonwalker.com/git/</id>
    <updated>2026-01-15T09:05:21Z</updated>
    <published>2026-01-15T09:05:21Z</published>
    <link href="https://go.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://go.waylonwalker.com/git-name-status/</id>
    <updated>2025-12-12T07:53:57Z</updated>
    <published>2025-12-12T07:53:57Z</published>
    <link href="https://go.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://go.waylonwalker.com/tea-login-flag/</id>
    <updated>2025-11-23T21:09:36Z</updated>
    <published>2025-11-23T21:09:36Z</published>
    <link href="https://go.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://go.waylonwalker.com/thought-860/</id>
    <updated>2025-10-29T13:04:20Z</updated>
    <published>2025-10-29T13:04:20Z</published>
    <link href="https://go.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;Outdated client!&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://go.waylonwalker.com/thought-821/</id>
    <updated>2025-08-29T13:23:08Z</updated>
    <published>2025-08-29T13:23:08Z</published>
    <link href="https://go.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://go.waylonwalker.com/thought-820/</id>
    <updated>2025-08-29T00:50:50Z</updated>
    <published>2025-08-29T00:50:50Z</published>
    <link href="https://go.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://go.waylonwalker.com/thought-818/</id>
    <updated>2025-08-28T23:45:53Z</updated>
    <published>2025-08-28T23:45:53Z</published>
    <link href="https://go.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://go.waylonwalker.com/thought-358/</id>
    <updated>2024-07-24T17:59:00Z</updated>
    <published>2024-07-24T17:59:00Z</published>
    <link href="https://go.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://go.waylonwalker.com/thought-230/</id>
    <updated>2024-03-29T02:04:41Z</updated>
    <published>2024-03-29T02:04:41Z</published>
    <link href="https://go.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://go.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://go.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://go.waylonwalker.com/gh-repo-create/</id>
    <updated>2022-06-10T11:53:32Z</updated>
    <published>2022-06-10T11:53:32Z</published>
    <link href="https://go.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://go.waylonwalker.com/git-merge-ours/</id>
    <updated>2022-05-24T12:12:09Z</updated>
    <published>2022-05-24T12:12:09Z</published>
    <link href="https://go.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://go.waylonwalker.com/git-python-all-commits/</id>
    <updated>2022-05-09T21:24:12Z</updated>
    <published>2022-05-09T21:24:12Z</published>
    <link href="https://go.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://go.waylonwalker.com/gpg-sign-git-ssh/</id>
    <updated>2022-05-08T15:09:59Z</updated>
    <published>2022-05-08T15:09:59Z</published>
    <link href="https://go.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://go.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://go.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://go.waylonwalker.com/python-git/</id>
    <updated>2022-04-30T20:23:23Z</updated>
    <published>2022-04-30T20:23:23Z</published>
    <link href="https://go.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://go.waylonwalker.com/git-pager/</id>
    <updated>2022-03-16T14:03:18Z</updated>
    <published>2022-03-16T14:03:18Z</published>
    <link href="https://go.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://go.waylonwalker.com/git-config-help-autocorrect/</id>
    <updated>2022-03-15T00:43:25Z</updated>
    <published>2022-03-15T00:43:25Z</published>
    <link href="https://go.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://go.waylonwalker.com/git-checkout-worktree/</id>
    <updated>2022-03-10T19:19:34Z</updated>
    <published>2022-03-10T19:19:34Z</published>
    <link href="https://go.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://go.waylonwalker.com/git-push-default-current/</id>
    <updated>2022-03-09T13:45:18Z</updated>
    <published>2022-03-09T13:45:18Z</published>
    <link href="https://go.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>
  <entry>
    <title>Recover a lost git branch with checkout</title>
    <id>https://go.waylonwalker.com/git-recover-checkout/</id>
    <updated>2022-03-01T14:34:01Z</updated>
    <published>2022-03-01T14:34:01Z</published>
    <link href="https://go.waylonwalker.com/git-recover-checkout/" rel="alternate" type="text/html"></link>
    <summary type="text">Once you give a branch the big D () its gone, its lost from your history. It&#39;s completely removed from your log. There will be no reference to these commits,...</summary>
    <content type="html">&lt;p&gt;Once you give a branch the big D (&lt;code&gt;git branch -D mybranch&lt;/code&gt;) its gone,&#xA;its lost from your history.  It’s completely removed from your log.&#xA;There will be no reference to these commits, or will there?&lt;/p&gt;&#xA;&lt;h2 id=&#34;tldr&#34;&gt;TLDR &lt;a href=&#34;#tldr&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Checkout is your savior, all you need is the commit hash.&lt;/p&gt;&#xA;&lt;h2 id=&#34;immediate-regret&#34;&gt;Immediate Regret &lt;a href=&#34;#immediate-regret&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;your terminal is still open&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;We have all done this, you give  branch the big D only to realize it was&#xA;the wrong one.  Don’t worry, not all is lost, this is the easiest to&#xA;recover from.  When you run the delete command you will see something&#xA;like this.&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 -D new&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Deleted branch new &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;was bc02a64&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;Notice the hash is right there is the hash of your commit.  You can use&#xA;that to get your content back.&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 bc02a64&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git branch new&#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;# or in one swoop checkout your new branch at the `start-point` you want&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 -b new bc02a64&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;delayed-reaction&#34;&gt;Delayed reaction &lt;a href=&#34;#delayed-reaction&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;you have closed your terminal&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you have closed your terminal, or have deleted with a gui or&#xA;something that does not tell you the hash as you run it, don’t fret, all&#xA;your work is still there (as long as you have commited).  You just have&#xA;to dig it out.  The reflog contains a list of all &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; operations that&#xA;have occurred on your git repo, and can be incredibly helpful with this.&lt;/p&gt;&#xA;&lt;h3 id=&#34;kinda-recent&#34;&gt;Kinda Recent &lt;a href=&#34;#kinda-recent&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;If your botched delete operation was recent just diving right into the&#xA;reflog will show it.&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 reflog&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;03a3338 &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;main&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;0&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from new to main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bc02a64 &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;HEAD -&amp;gt; another, new&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;4&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: commit: newfile&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;03a3338 &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;main&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;2&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from main to new&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;blockquote&gt;&#xA;&lt;p&gt;In this example, I checked out a branch called new, commited a new&#xA;file, then switched back to main and deleted new.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Now That I have the commit hash I can use the same solution to get my&#xA;branch back.&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 bc02a64&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git branch new&#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;# or in one swoop checkout your new branch at the `start-point` you want&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 -b new bc02a64&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;a-lot-has-happened-since-then&#34;&gt;A lot has happened since then &lt;a href=&#34;#a-lot-has-happened-since-then&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;If a lot has happened since then, you are going to need to pull out some&#xA;more tool to sift through that &lt;code&gt;reflog&lt;/code&gt;, especially if its a big one.&#xA;The first suggestion that I have is to pipe into grep and look for&#xA;commit messages, or the name of the 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 reflog &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep &lt;span class=&#34;s2&#34;&gt;&amp;#34;moving from&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;03a3338 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;1&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from main to branch/oops&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;03a3338 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;2&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from oops to main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;03a3338 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;4&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from main to oops&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;03a3338 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;5&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from another to main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bc02a64 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;6&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from main to another&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;03a3338 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;7&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from another to main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bc02a64 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;8&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from new to another&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bc02a64 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;9&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from bc02a64bbe5683d905e333e8dfcbbb91a5e77549 to new&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bc02a64 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;10&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from main to bc02a64bbe56&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;03a3338 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;11&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from new to main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;03a3338 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;13&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from main to new&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;03a3338 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;14&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from other to main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;03a3338 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;18&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: checkout: moving from main to other&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;git has a built in &lt;code&gt;--grep&lt;/code&gt; flag, but I don’t think there is a way to&#xA;filter by branch name, regardless it still is helpful.&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 reflog --grep new&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bc02a64 &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;HEAD -&amp;gt; another, new&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;4&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: commit: newfile&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Maybe if you can remember a filename you can pass in &lt;code&gt;-- &amp;lt;filename&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;git reflog -- readme.md&#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;There are many other ways to slice up a git log, and reflog alike. check&#xA;out &lt;code&gt;man git log&lt;/code&gt; for some more flags.&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>git find deleted files</title>
    <id>https://go.waylonwalker.com/git-find-deleted-files/</id>
    <updated>2022-02-28T16:45:19Z</updated>
    <published>2022-02-28T16:45:19Z</published>
    <link href="https://go.waylonwalker.com/git-find-deleted-files/" rel="alternate" type="text/html"></link>
    <summary type="text">It&#39;s nearly impossible to completely loose a file if it is commited to git. It&#39;s likely harder to fully remove the file than it is to recover it, but how do...</summary>
    <content type="html">&lt;p&gt;It’s nearly impossible to completely loose a file if it is commited to &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;.&#xA;It’s  likely harder to fully remove the file than it is to recover it, but how&#xA;do we go about recovering those precious files that we have lost.&lt;/p&gt;&#xA;&lt;p&gt;Listing all the deleted files in all of git history can be done by&#xA;combining &lt;code&gt;git log&lt;/code&gt; with &lt;code&gt;--diff-filter&lt;/code&gt;.  The log gives you lots of&#xA;options to show different bits of information about the commit that&#xA;happened at that point.  It’s even possible to get a completely clean&#xA;list of files that are in your git history but have been deleted.&lt;/p&gt;&#xA;&lt;h2 id=&#34;git-log---diff-filter&#34;&gt;git log –diff-filter &lt;a href=&#34;#git-log---diff-filter&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;These various commands will show all files that were ever deleted on&#xA;your 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;&lt;span class=&#34;c1&#34;&gt;# This one includes the date, commit hash, and Author&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 --diff-filter D&#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;# this one could be a git alias, but includes empty lines&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 --diff-filter D --pretty&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;format:&amp;#34;&lt;/span&gt; --name-only&#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;# this one has the empty lines cleaned up&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 --diff-filter D --pretty&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;format:&amp;#34;&lt;/span&gt; --name-only &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed &lt;span class=&#34;s1&#34;&gt;&amp;#39;/^$/d&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a href=&#34;/git-diff-filter/&#34; class=&#34;wikilink&#34; data-title=&#34;git diff-filter&#34; data-description=&#34;Git commands such as , , all take a flag called . This can filter for only certain types of diffs, such as added (A), modified (M), or deleted (D).&#34; data-date=&#34;2022-02-27&#34; data-preview=&#34;Git commands such as , , all take a flag called . This can filter for only certain types of diffs, such as added (A), modified (M), or deleted (D).&#34;&gt;git diff-filter&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;git-reflog---diff-filter&#34;&gt;git reflog –diff-filter &lt;a href=&#34;#git-reflog---diff-filter&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The reflog can be super powerful in finding lost files here, as it only&#xA;cares about git operations, not just the current branch.  It will search&#xA;accross all branches for deleted files and report them.&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;# This one includes the commit hash, branch, tag, and commit message&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 reflog --diff-filter D&#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;# You might want to at least add the filename&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 reflog --diff-filter D --name-only&#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;# this one could be a git alias, but includes empty lines&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 reflog --diff-filter D --pretty&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;format:&amp;#34;&lt;/span&gt; --name-only&#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;# this one has the empty lines cleaned up&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 reflog --diff-filter D --pretty&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;format:&amp;#34;&lt;/span&gt; --name-only &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed &lt;span class=&#34;s1&#34;&gt;&amp;#39;/^$/d&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;get-the-last-commit-from-a-file&#34;&gt;get the last commit from a file &lt;a href=&#34;#get-the-last-commit-from-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 log -n &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; --pretty&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;format:%H -- file&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you want dont like how the output looks or you want your default pager to be&#xA;different you can configure the default pager see &lt;a href=&#34;/git-pager/&#34; class=&#34;wikilink&#34; data-title=&#34;Set Your Git Pager Config&#34; data-description=&#34;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...&#34; data-date=&#34;2022-03-16&#34; data-preview=&#34;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...&#34;&gt;Set Your Git Pager Config&lt;/a&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>git diff-filter</title>
    <id>https://go.waylonwalker.com/git-diff-filter/</id>
    <updated>2022-02-27T16:34:31Z</updated>
    <published>2022-02-27T16:34:31Z</published>
    <link href="https://go.waylonwalker.com/git-diff-filter/" rel="alternate" type="text/html"></link>
    <summary type="text">Git commands such as , , all take a flag called . This can filter for only certain types of diffs, such as added (A), modified (M), or deleted (D).</summary>
    <content type="html">&lt;p&gt;&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; commands such as &lt;code&gt;diff&lt;/code&gt;, &lt;code&gt;log&lt;/code&gt;, &lt;code&gt;whatchanged&lt;/code&gt; all take a flag called&#xA;&lt;code&gt;--diff-filter&lt;/code&gt;.  This can filter for only certain types of diffs, such&#xA;as added (A), modified (M), or deleted (D).&lt;/p&gt;&#xA;&lt;h2 id=&#34;man-page&#34;&gt;Man page &lt;a href=&#34;#man-page&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;You can find the full description by searching for &lt;code&gt;--diff-filter&lt;/code&gt; in&#xA;the &lt;code&gt;man git diff&lt;/code&gt; page.&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;--diff-filter&lt;span class=&#34;o&#34;&gt;=[(&lt;/span&gt;A&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;C&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;D&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;M&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;R&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;T&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;U&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;X&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;B&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;...&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;*&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    Select only files that are Added &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;A&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;, Copied &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;C&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;, Deleted &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;D&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;, Modified &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;M&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;, Renamed &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;R&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;, have their &lt;span class=&#34;nb&#34;&gt;type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;i.e. regular file, symlink, submodule, ...&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;    changed &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;T&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;, are Unmerged &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;U&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;, are Unknown &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;X&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;, or have had their pairing Broken &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;B&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;. Any combination of the filter characters &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;including none&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; can be used.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    When * &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;All-or-none&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; is added to the combination, all paths are selected &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; there is any file that matches other criteria in the comparison&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; there is no&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    file that matches other criteria, nothing is selected.&#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;    Also, these upper-case letters can be downcased to exclude. E.g.  --diff-filter&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;ad excludes added and deleted paths.&#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;    Note that not all diffs can feature all types. For instance, diffs from the index to the working tree can never have Added entries &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;because the &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; of paths&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    included in the diff is limited by what is in the index&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;. Similarly, copied and renamed entries cannot appear &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; detection &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; those types is disabled.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;try-it-out&#34;&gt;Try it out &lt;a href=&#34;#try-it-out&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Open up a git repo and play around with this, here are some example that&#xA;I played with that seemed useful to me.&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# find when any files were deleted&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 --diff-filter D&#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;# find when all files were added&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 --diff-filter A&#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;# only one specific 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 log --diff-filter A -- readme.md&#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;# partial match to a single 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 log --diff-filter A -- read*&#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;# Find when all python files were added&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 --diff-filter A -- *.py&#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 rebase to the beginning of time</title>
    <id>https://go.waylonwalker.com/git-rebase-root/</id>
    <updated>2022-02-23T15:57:37Z</updated>
    <published>2022-02-23T15:57:37Z</published>
    <link href="https://go.waylonwalker.com/git-rebase-root/" rel="alternate" type="text/html"></link>
    <summary type="text">Git has a built in way to rebase all the way back to the beginning of time. There is no need to scroll through the log to find the first hash, or find the...</summary>
    <content type="html">&lt;p&gt;&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; has a built in way to rebase all the way back to the beginning of&#xA;time.  There is no need to scroll through the log to find the first&#xA;hash, or find the total number of commits. Just use &lt;code&gt;--root&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;git rebase --root&#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>Revive files from the dead with git</title>
    <id>https://go.waylonwalker.com/git-revive-dead-files/</id>
    <updated>2022-02-21T15:44:02Z</updated>
    <published>2022-02-21T15:44:02Z</published>
    <link href="https://go.waylonwalker.com/git-revive-dead-files/" rel="alternate" type="text/html"></link>
    <summary type="text">Git reflog can perform some serious magic in reviving your hard work from the dead if you happen to loose it.</summary>
    <content type="html">&lt;p&gt;&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; reflog can perform some serious magic in reviving your hard work&#xA;from the dead if you happen to loose it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;caveat&#34;&gt;caveat &lt;a href=&#34;#caveat&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;You must git commit!  If you never commit the file, git cannot help you.&#xA;You might look into your trashcan, filesystem versions, onedrive, box, dropbox.&#xA;If you have none of this, then you are probably hosed.&lt;/p&gt;&#xA;&lt;h2 id=&#34;practice&#34;&gt;practice &lt;a href=&#34;#practice&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I really like to practice these techniques before I need to use them so&#xA;that I understand how they work in a low stakes fashion.  This helps me&#xA;understand what I can and cannot do, and how to do it in a place that&#xA;does not matter in any way at all.&lt;/p&gt;&#xA;&lt;p&gt;This is what I did to revive a dropped &lt;code&gt;docker-compose.yml&lt;/code&gt; file.  The&#xA;idea is that if I can find the commit hash, I can &lt;code&gt;cherry-pick&lt;/code&gt; it.&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 init&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;touch readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git add readme.md&#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;add readme&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;touch docker-compose.yml&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git add docker-compose.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;add docker-compose&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 reset 3cfc --hard&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git reflog&#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;# copy the hash of the commit with my docker-compose commit&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git cherry-pick fd74df3&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;reflog&#34;&gt;reflog &lt;a href=&#34;#reflog&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Here was the final reflog that shows all of my git actions.  &lt;strong&gt;note&lt;/strong&gt; I&#xA;did reset twice.&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 reflog --name-only&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;0404b6a &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;HEAD -&amp;gt; main&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;0&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: cherry-pick: add docker-compose&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker-compose.yml&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3cfcab9 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;1&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: reset: moving to 3cfc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;9175695&lt;/span&gt; HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;2&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: cherry-pick: add docker-compose&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker-compose.yml&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3cfcab9 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;3&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: reset: moving to 3cfc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fd74df3 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;4&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: commit: add docker-compose&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker-compose.yml&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3cfcab9 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;5&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: reset: moving to HEAD&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3cfcab9 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;6&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: commit &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;initial&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;: add readme&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;readme.md&#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 reflog is an alias for git log -g</title>
    <id>https://go.waylonwalker.com/git-reflog-is-an-alias/</id>
    <updated>2022-02-19T15:02:52Z</updated>
    <published>2022-02-19T15:02:52Z</published>
    <link href="https://go.waylonwalker.com/git-reflog-is-an-alias/" rel="alternate" type="text/html"></link>
    <summary type="text">Right inside the git docs, is states that the command runs by default which is an alias for</summary>
    <content type="html">&lt;p&gt;Right inside the &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; &lt;a href=&#34;https://git-scm.com/docs/git-reflog#_description&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/git-scm.com.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/git-scm.com.ico&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;docs&lt;/a&gt;,&#xA;is states that the &lt;code&gt;git reflog&lt;/code&gt; command runs &lt;code&gt;git reflog show&lt;/code&gt; by default which&#xA;is an alias for &lt;code&gt;git log -g --abbrev-commit --pretty=oneline&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;This epiphany deepens my understanding of git, and lets me understand that most&#xA;&lt;code&gt;git log&lt;/code&gt; flags might also work with &lt;code&gt;git log -g&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;full-or-short-format&#34;&gt;full or short format &lt;a href=&#34;#full-or-short-format&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Here are some git commands for you to try out on your own that are all pretty&#xA;similar, but vary in how much information they show.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-stat&#34;&gt;# These show only first line of the commit message subject, the hash, and index&#xA;git reflog&#xA;git log -g --abbrev-commit --pretty=oneline&#xA;&#xA;# similar to git log, this is a fully featured log with author, date, and full&#xA;# commit message&#xA;git log -g&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;add-files&#34;&gt;add files &lt;a href=&#34;#add-files&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;If I am looking for a missing file, I might want to leverage &lt;code&gt;--name-only&lt;/code&gt; or&#xA;&lt;code&gt;--stat&lt;/code&gt;, to see where I might have hard reset that file, or deleted it.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git reflog --stat&#xA;git log -g --stat --abbrev-commit --pretty=oneline&#xA;&#xA;git reflog --name-only&#xA;git log -g --name-only --abbrev-commit --pretty=oneline&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;example &lt;a href=&#34;#example&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Here is an example where I lost my &lt;code&gt;docker-compose.yml&lt;/code&gt; file in a git reset,&#xA;and got it back by finding the commit hash with &lt;code&gt;git reflog&lt;/code&gt; and cherry picked&#xA;it back.&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 reflog --name-only&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;0404b6a &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;HEAD -&amp;gt; main&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;0&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: cherry-pick: add docker-compose&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker-compose.yml&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3cfcab9 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;1&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: reset: moving to 3cfc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;9175695&lt;/span&gt; HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;2&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: cherry-pick: add docker-compose&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker-compose.yml&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3cfcab9 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;3&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: reset: moving to 3cfc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fd74df3 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;4&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: commit: add docker-compose&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker-compose.yml&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3cfcab9 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;5&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: reset: moving to HEAD&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3cfcab9 HEAD@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;6&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: commit &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;initial&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;: add readme&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This just proves that its harder to remove something from git, than it is to&#xA;get it back.  It can feel impossible to get something back, but once its in, it&#xA;feels even more impossible to get it out.&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>A Good Use for global .gitignore</title>
    <id>https://go.waylonwalker.com/global-gitignore-considered-useful/</id>
    <updated>2022-01-30T02:11:51Z</updated>
    <published>2022-01-30T02:11:51Z</published>
    <link href="https://go.waylonwalker.com/global-gitignore-considered-useful/" rel="alternate" type="text/html"></link>
    <summary type="text">I&#39;ve never found a great use for a global file. Mostly I fear that by adding a lot of the common things like files it will be missing from the project and...</summary>
    <content type="html">&lt;p&gt;I’ve never found a great use for a global &lt;code&gt;.gitignore&lt;/code&gt; file.  Mostly I fear&#xA;that by adding a lot of the common things like &lt;code&gt;.pyc&lt;/code&gt; files it will be missing&#xA;from the project and inevitably be committed to the project by someone else.&lt;/p&gt;&#xA;&lt;h2 id=&#34;personal-tools&#34;&gt;Personal Tools &lt;a href=&#34;#personal-tools&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Within the past year I have added some tools to my personal setup that are not&#xA;required to run the project, but works really well with my setup.  They are&#xA;&lt;code&gt;direnv&lt;/code&gt; and &lt;code&gt;pyflyby&lt;/code&gt;.  Since these both support project level configuration,&#xA;are less common, and not in most  &lt;code&gt;.gitignore&lt;/code&gt; templates they make for great&#xA;candidates to add to a global &lt;code&gt;.gitignore&lt;/code&gt; file.&lt;/p&gt;&#xA;&lt;h2 id=&#34;create-the-config&#34;&gt;create the config &lt;a href=&#34;#create-the-config&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Like any &lt;code&gt;.gitignore&lt;/code&gt; it supports gits wildignore syntax.  I made a&#xA;&lt;code&gt;~/dotfiles/git/.global_gitignore&lt;/code&gt; file, and added the following to it.&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;.envrc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.pyflyby&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.copier-defaults&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.venv*/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.python-version&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;markout&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.markata.cache&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Once I had this file, I stowed it into &lt;code&gt;~/.global_gitignore&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;cd&lt;/span&gt; ~/dotfiles/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;stow git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;blockquote&gt;&#xA;&lt;p&gt;Always stow your dotfiles, don’t set yourself up for wondering why your next&#xA;machine is not working right.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;stow-note&#34;&gt;stow note &lt;a href=&#34;#stow-note&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Note, the reason that it is a &lt;code&gt;~/.global_gitignore&lt;/code&gt; and not a &lt;code&gt;~/.gitignore&lt;/code&gt; is&#xA;that I was unable to stow a &lt;code&gt;.gitignore file&lt;/code&gt;.  They must be ignored by&#xA;default, and I was unable to figure out how to turn it back on.&lt;/p&gt;&#xA;&lt;h2 id=&#34;set-the-config&#34;&gt;set the config &lt;a href=&#34;#set-the-config&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Next run this command to add the &lt;code&gt;~/.global_gitignore&lt;/code&gt; to your gitignore as a&#xA;global excludesfile.&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.excludesfile ~/.global_gitignore&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;commit-it&#34;&gt;commit it &lt;a href=&#34;#commit-it&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Once you have done this you should have both your &lt;code&gt;~/dotfiles/git/.gitconfig&lt;/code&gt;&#xA;and &lt;code&gt;~/dotfiles/.global_gitignore&lt;/code&gt; ready to commit.&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; ~/dotfiles&#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 add git/.global_gitignore&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git add git/.gitconfig&#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 commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;add global_gitignore&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;you-didnt-stow-your-gitconfig&#34;&gt;You didn’t stow your .gitconfig &lt;a href=&#34;#you-didnt-stow-your-gitconfig&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;the shame!&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;No worries, lets get it into your dotfiles repo and stow it.&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; ~/dotfiles&#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;# if you dont have a git directory make it.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mkdir git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mv ~/.gitconfig ~/devtainer/git&#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;# now use stow to symlink it back to where it was&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;# so git works as expected.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;stow git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;you-dont-have-a-dotfiles-directory&#34;&gt;You dont have a dotfiles directory &lt;a href=&#34;#you-dont-have-a-dotfiles-directory&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;double shame 😲&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you dont already have a dotfiles directry you should.  It is important for&#xA;it to be in your home directory for stow to work properly, if you really don’t&#xA;want it there, look up how to configure stow to account for this.&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;# make a dotfiles directory and go there&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mkdir ~/dotfiles&#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;cd&lt;/span&gt; ~/dotfiles&#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;# make it a git 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;git init&#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;# if you dont have a git directory make it.&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;mkdir git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mv ~/.gitconfig ~/devtainer/git&#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;# now use stow to symlink it back to where it was&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;# so git works as expected.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;stow git&#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>fugitive verbose commit</title>
    <id>https://go.waylonwalker.com/fugitive-commit-verbose/</id>
    <updated>2021-12-22T19:34:18Z</updated>
    <published>2021-12-22T19:34:18Z</published>
    <link href="https://go.waylonwalker.com/fugitive-commit-verbose/" rel="alternate" type="text/html"></link>
    <summary type="text">Fugitive comes with a pretty sick way to commit files and see the diff at the same time with verbose commit. Opening the fugitive menu with brings up your...</summary>
    <content type="html">&lt;p&gt;Fugitive comes with a pretty sick way to commit files and see the diff at the&#xA;same time with verbose commit.  Opening the fugitive menu with &lt;code&gt;:G&lt;/code&gt; brings up&#xA;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; status, you can stage files with &lt;code&gt;s&lt;/code&gt;, unstage them with &lt;code&gt;u&lt;/code&gt;, toggle&#xA;them with &lt;code&gt;-&lt;/code&gt;, and toggle their diff with &lt;code&gt;&amp;gt;&lt;/code&gt;.  Once you have staged your files&#xA;for commit, you can commit with &lt;code&gt;cc&lt;/code&gt;, but today I found that you can commit&#xA;verbose with &lt;code&gt;cvc&lt;/code&gt;.  This brings up not only a commit widow with your git&#xA;status shown, but the diff that you are about to commit.&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&lt;a href=&#34;https://images.waylonwalker.com/fugitive-verbose-commit.png&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;glightbox&#34; src=&#34;https://images.waylonwalker.com/fugitive-verbose-commit.png&#34; alt=&#34;fugitive verbose commit example&#34;/ data-glightbox=&#34;description: fugitive verbose commit example&#34;&gt;&lt;/a&gt;&#xA;&lt;/figure&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;example of a verbose commit in fugitive&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Code Review from the comfort of vim | Diffurcate</title>
    <id>https://go.waylonwalker.com/diffurcate/</id>
    <updated>2021-12-04T11:34:47Z</updated>
    <published>2021-12-04T11:34:47Z</published>
    <link href="https://go.waylonwalker.com/diffurcate/" rel="alternate" type="text/html"></link>
    <summary type="text">I often review Pull requests from the browser as it just makes it so easy to see the diffs and navigate through them, but there comes a time when the diffs...</summary>
    <content type="html">&lt;p&gt;I often review Pull requests from the browser as it just makes it so easy to see&#xA;the diffs and navigate through them, but there comes a time when the diffs get&#xA;really big and hard to follow.  That’s when its time to bring in the comforts of&#xA;vim.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://youtu.be/5NKaZFavM0E&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/youtu.be.png&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/youtu.be.png&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;https://youtu.be/5NKaZFavM0E&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;plugins-needed&#34;&gt;Plugins needed &lt;a href=&#34;#plugins-needed&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;This all stems from the great plugin by&#xA;&lt;a href=&#34;https://github.com/AndrewRadev&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/github.com.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/github.com.ico&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;AndrewRadev&lt;/a&gt;.  It breaks a down&#xA;into a project.  So rather than poping into a pager from &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;you can pipe to diffurcate and it will setup a project in a tmp&#xA;directory for you and you  can browse this project just like any&#xA;other except it’s just a diff.&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;nx&#34;&gt;Plug&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;AndrewRadev/diffurcate.vim&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;my-aliases&#34;&gt;My aliases &lt;a href=&#34;#my-aliases&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;First to quickly checkout PR’s from azure devops I have setup an alias to fuzzy&#xA;select a pr and let the &lt;code&gt;az&lt;/code&gt; command do the checkout.&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;azcheckout&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;az repos pr checkout --id $(az repos pr list --output table | tail -n -2 | fzf | cut -d &amp;#34; &amp;#34; -f1)&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Next I have a few aliases setup for checking diffs.  The first one checks what&#xA;is staged vs the current branch, the others check the current branch vs main or&#xA;master.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;alias diffstaged=&amp;#34;git diff --staged | nvim - +Diffurcate &amp;#39;+Telescope find_files&amp;#39;&amp;#34;&#xA;alias diffmain=&amp;#34;git diff main.. | nvim - +Diffurcate &amp;#39;+Telescope find_files&amp;#39;&amp;#34;&#xA;alias diffmaster=&amp;#34;git diff master.. | nvim - +Diffurcate &amp;#39;+Telescope find_files&amp;#39;&amp;#34;&#xA;&#xA;diffcommit() {&#xA;    git diff $1 | nvim - +Diffurcate &amp;#39;+Telescope find_files&amp;#39;&#xA;}&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;links&#34;&gt;Links &lt;a href=&#34;#links&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/AndrewRadev/diffurcate.vim&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/github.com.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/github.com.ico&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;diffurcte.vim&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Git in Depth Notes</title>
    <id>https://go.waylonwalker.com/git-in-depth/</id>
    <updated>2021-07-31T08:44:44Z</updated>
    <published>2021-07-31T08:44:44Z</published>
    <link href="https://go.waylonwalker.com/git-in-depth/" rel="alternate" type="text/html"></link>
    <summary type="text">These are my notes from taking @nnja&#39;s FEM course git-in-depth.</summary>
    <content type="html">&lt;p&gt;These are my notes from taking @nnja’s FEM course &lt;a href=&#34;https://frontendmasters.com/courses/git-in-depth/&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/frontendmasters.com.png&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/frontendmasters.com.png&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;git-in-depth&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;requirements&#34;&gt;requirements &lt;a href=&#34;#requirements&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;git --version&lt;/code&gt; &amp;gt; than 2.0&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;creating-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;&#34;&gt;creating a git &lt;a href=&#34;#creating-a-git&#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;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;hello&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; git hash-object --stdin&#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>How I configure git</title>
    <id>https://go.waylonwalker.com/git-settings/</id>
    <updated>2021-06-25T20:50:45Z</updated>
    <published>2021-06-25T20:50:45Z</published>
    <link href="https://go.waylonwalker.com/git-settings/" rel="alternate" type="text/html"></link>
    <summary type="text">Git can be a bit tricky to get configured correctly. I often stumble into config issues weeks after setting up a new machine that I did not even notice....</summary>
    <content type="html">&lt;p&gt;&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 a bit tricky to get configured correctly.  I often stumble into&#xA;config issues weeks after setting up a new machine that I did not even notice.&#xA;These are my notes to remind me how I configure git.&lt;/p&gt;&#xA;&lt;h2 id=&#34;identity&#34;&gt;Identity &lt;a href=&#34;#identity&#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 config --global user.name &lt;span class=&#34;s2&#34;&gt;&amp;#34;John Doe&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 config --global user.email johndoe@example.com&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;rebase&#34;&gt;rebase &lt;a href=&#34;#rebase&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;editor&#34;&gt;editor &lt;a href=&#34;#editor&#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 config --global core.editor nvim&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;default-branch&#34;&gt;default branch &lt;a href=&#34;#default-branch&#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 config --global init.defaultBranch main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;push-to-current-bransh-wihtout-setting-upstream&#34;&gt;push to current bransh wihtout setting upstream &lt;a href=&#34;#push-to-current-bransh-wihtout-setting-upstream&#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 config --global push.default current&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;autostash&#34;&gt;Autostash &lt;a href=&#34;#autostash&#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 config pull.rebase &lt;span class=&#34;nb&#34;&gt;true&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 rebase.autoStash &lt;span class=&#34;nb&#34;&gt;true&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>How to use git cherry pick</title>
    <id>https://go.waylonwalker.com/cherry-pick/</id>
    <updated>2021-05-13T08:51:45Z</updated>
    <published>2021-05-13T08:51:45Z</published>
    <link href="https://go.waylonwalker.com/cherry-pick/" rel="alternate" type="text/html"></link>
    <content type="html">&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 via 🐍 v3.8.5&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ mkdir git-cherry-pick-learn&#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 via 🐍 v3.8.5&#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;cd&lt;/span&gt; git-cherry-pick-learn&#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/git-cherry-pick-learn&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git init&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Initialized empty Git repository in /home/walkews/git/git-cherry-pick-learn/.git/&#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-cherry-pick-learn on  main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ touch readme.md&#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-cherry-pick-learn on  main &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;?&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git status&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;On branch main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;No commits yet&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Untracked files:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;use &lt;span class=&#34;s2&#34;&gt;&amp;#34;git add &amp;lt;file&amp;gt;...&amp;#34;&lt;/span&gt; to include in what will be committed&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nothing added to commit but untracked files present &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;use &lt;span class=&#34;s2&#34;&gt;&amp;#34;git add&amp;#34;&lt;/span&gt; to track&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git-cherry-pick-learn on  main &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;?&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git add .&#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-cherry-pick-learn on  main &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;init readme&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;o&#34;&gt;[&lt;/span&gt;main &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;root-commit&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; ebd1ff2&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; init readme&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; file changed, &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; insertions&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;, &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; deletions&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;-&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; create mode &lt;span class=&#34;m&#34;&gt;100644&lt;/span&gt; readme.md&#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-cherry-pick-learn on  main&#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;Learn Cherry Pick&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;Learn Cherry Pick&#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-cherry-pick-learn on  main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git add .&#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-cherry-pick-learn on  main&#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;add title&#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;s2&#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;s2&#34;&gt;git-cherry-pick-learn on  main&#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;s2&#34;&gt;❯ echo &amp;#34;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Learn Cherry Pick&amp;#34; &amp;gt; readme.md&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;git-cherry-pick-learn on  main &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;!&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git add .&#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-cherry-pick-learn on  main &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git diff&#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-cherry-pick-learn on  main &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git diff --staged&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;diff --git a/readme.md b/readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;index e69de29..3490cef &lt;span class=&#34;m&#34;&gt;100644&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;--- a/readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;+++ b/readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;@@ -0,0 +1 @@&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;+# Learn Cherry Pick&#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-cherry-pick-learn on  main &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;add title&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;o&#34;&gt;[&lt;/span&gt;main 148264d&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; add title&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; file changed, &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; insertion&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git-cherry-pick-learn on  main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git checkout -b trash-branch&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Switched to a new branch &lt;span class=&#34;s1&#34;&gt;&amp;#39;trash-branch&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;git-cherry-pick-learn on  trash-branch&#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; &amp;gt;&amp;gt; readme.md&#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-cherry-pick-learn on  trash-branch &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;!&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &amp;gt;&amp;gt; readme.md&#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-cherry-pick-learn on  trash-branch &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;!&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &amp;gt;&amp;gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Cherry Pick is amazing&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;git-cherry-pick-learn on  trash-branch &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;!?&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ cat readme.md&#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;       │ File: readme.md&#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;m&#34;&gt;1&lt;/span&gt;   │ &lt;span class=&#34;c1&#34;&gt;# Learn Cherry Pick&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; + │&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt; + │&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git-cherry-pick-learn on  trash-branch &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;!?&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;  &lt;span class=&#34;s2&#34;&gt;&amp;#34;Cherry Pick is amazing&amp;#34;&lt;/span&gt; &amp;gt;&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;git-cherry-pick-learn on  trash-branch &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;!?&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;add whitespace&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;On branch trash-branch&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Changes not staged &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; commit:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;use &lt;span class=&#34;s2&#34;&gt;&amp;#34;git add &amp;lt;file&amp;gt;...&amp;#34;&lt;/span&gt; to update what will be committed&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;use &lt;span class=&#34;s2&#34;&gt;&amp;#34;git restore &amp;lt;file&amp;gt;...&amp;#34;&lt;/span&gt; to discard changes in working directory&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;        modified:   readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Untracked files:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;use &lt;span class=&#34;s2&#34;&gt;&amp;#34;git add &amp;lt;file&amp;gt;...&amp;#34;&lt;/span&gt; to include in what will be committed&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        Cherry Pick is amazing&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;no changes added to commit &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;use &lt;span class=&#34;s2&#34;&gt;&amp;#34;git add&amp;#34;&lt;/span&gt; and/or &lt;span class=&#34;s2&#34;&gt;&amp;#34;git commit -a&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git-cherry-pick-learn on  trash-branch &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;!?&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git add .&#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-cherry-pick-learn on  trash-branch &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;add whitespace&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;o&#34;&gt;[&lt;/span&gt;trash-branch 94f734b&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; add whitespace&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; files changed, &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt; insertions&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; create mode &lt;span class=&#34;m&#34;&gt;100644&lt;/span&gt; Cherry Pick is amazing&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git-cherry-pick-learn on  trash-branch&#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;TRASH&amp;#34;&lt;/span&gt; &amp;gt;&amp;gt; readme.md&#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-cherry-pick-learn on  trash-branch &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;!&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git add .&#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-cherry-pick-learn on  trash-branch &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;add trash&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;o&#34;&gt;[&lt;/span&gt;trash-branch ec43879&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; add trash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; file changed, &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; insertion&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git-cherry-pick-learn on  trash-branch&#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;Cherry Pick is Amazing&amp;#34;&lt;/span&gt; &amp;gt;&amp;gt; readme.md&#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-cherry-pick-learn on  trash-branch &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;!&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;add cherry pick is amazing&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;On branch trash-branch&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Changes not staged &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; commit:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;use &lt;span class=&#34;s2&#34;&gt;&amp;#34;git add &amp;lt;file&amp;gt;...&amp;#34;&lt;/span&gt; to update what will be committed&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;use &lt;span class=&#34;s2&#34;&gt;&amp;#34;git restore &amp;lt;file&amp;gt;...&amp;#34;&lt;/span&gt; to discard changes in working directory&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;        modified:   readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;no changes added to commit &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;use &lt;span class=&#34;s2&#34;&gt;&amp;#34;git add&amp;#34;&lt;/span&gt; and/or &lt;span class=&#34;s2&#34;&gt;&amp;#34;git commit -a&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git-cherry-pick-learn on  trash-branch &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;!&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git add .&#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-cherry-pick-learn on  trash-branch &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;add cherry pick is amazing&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;o&#34;&gt;[&lt;/span&gt;trash-branch 6691a34&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; add cherry pick is amazing&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; file changed, &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; insertion&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git-cherry-pick-learn on  trash-branch&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ cat readme.md&#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;       │ File: readme.md&#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;m&#34;&gt;1&lt;/span&gt;   │ &lt;span class=&#34;c1&#34;&gt;# Learn Cherry Pick&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;   │&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt;   │&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;m&#34;&gt;4&lt;/span&gt;   │ TRASH&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;m&#34;&gt;5&lt;/span&gt;   │ Cherry Pick is Amazing&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git-cherry-pick-learn on  trash-branch&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git log&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;commit 6691a343e0ba35d0700c49ec09a99fa8f1f385b9 &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;HEAD -&amp;gt; trash-branch&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;Author: Waylon Walker &amp;lt;walker_waylon_s@cat.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Thu May &lt;span class=&#34;m&#34;&gt;13&lt;/span&gt; 08:54:58 &lt;span class=&#34;m&#34;&gt;2021&lt;/span&gt; -0500&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    add cherry pick is amazing&#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;commit ec438790af36c23aef8eee2122f0dda95313496b&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Author: Waylon Walker &amp;lt;walker_waylon_s@cat.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Thu May &lt;span class=&#34;m&#34;&gt;13&lt;/span&gt; 08:54:07 &lt;span class=&#34;m&#34;&gt;2021&lt;/span&gt; -0500&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    add trash&#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;commit 94f734b1adcee0f503c818c0f6bc9da97a0066e2&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Author: Waylon Walker &amp;lt;walker_waylon_s@cat.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Thu May &lt;span class=&#34;m&#34;&gt;13&lt;/span&gt; 08:50:35 &lt;span class=&#34;m&#34;&gt;2021&lt;/span&gt; -0500&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    add whitespace&#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;commit 148264da5641033caa537727c6d5199068d58a4d &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;Author: Waylon Walker &amp;lt;walker_waylon_s@cat.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Thu May &lt;span class=&#34;m&#34;&gt;13&lt;/span&gt; 08:48:58 &lt;span class=&#34;m&#34;&gt;2021&lt;/span&gt; -0500&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    add title&#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;commit ebd1ff22493d860e001f2b96ec948684d496355b&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Author: Waylon Walker &amp;lt;walker_waylon_s@cat.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Thu May &lt;span class=&#34;m&#34;&gt;13&lt;/span&gt; 08:47:10 &lt;span class=&#34;m&#34;&gt;2021&lt;/span&gt; -0500&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    init readme&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git-cherry-pick-learn on  trash-branch&#xA;&lt;/span&gt;&lt;/span&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;Switched to branch &lt;span class=&#34;s1&#34;&gt;&amp;#39;main&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;git-cherry-pick-learn on  main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ cat readme.md&#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;       │ File: readme.md&#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;m&#34;&gt;1&lt;/span&gt;   │ &lt;span class=&#34;c1&#34;&gt;# Learn Cherry Pick&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Trim unused git branches</title>
    <id>https://go.waylonwalker.com/trim-branches/</id>
    <updated>2021-05-07T09:47:24Z</updated>
    <published>2021-05-07T09:47:24Z</published>
    <link href="https://go.waylonwalker.com/trim-branches/" rel="alternate" type="text/html"></link>
    <content type="html">&lt;h2 id=&#34;trim-branches-no-longer-on-origin&#34;&gt;Trim branches no longer on origin &lt;a href=&#34;#trim-branches-no-longer-on-origin&#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 remote prune origin --dry-run&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git remote prune origin&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;find-branches-already-merged&#34;&gt;Find branches already merged &lt;a href=&#34;#find-branches-already-merged&#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 main&#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;# list remote branches that have already been merged into main&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 branch -r --merged&#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;# list local branches that have already been merged into main&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 branch --merged&#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>Gitui is a blazing fast terminal git interface</title>
    <id>https://go.waylonwalker.com/gitui-slides/</id>
    <updated>2021-01-17T00:00:00Z</updated>
    <published>2021-01-17T00:00:00Z</published>
    <link href="https://go.waylonwalker.com/gitui-slides/" rel="alternate" type="text/html"></link>
    <summary type="text">Gitui is a terminal-based git user interface (TUI) that will change the way that you work with git.</summary>
    <content type="html">&lt;h2 id=&#34;gitui&#34;&gt;GitUI &lt;a href=&#34;#gitui&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Gitui is a terminal-based &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; user interface (TUI) that will change the way&#xA;that you work with git.&lt;/p&gt;&#xA;&lt;h2 id=&#34;works-alongside-the-cli&#34;&gt;Works alongside the cli &lt;a href=&#34;#works-alongside-the-cli&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I have been a long-time user of the git cli, and it’s&#xA;been hard to beat, mostly because there is nothing that keeps my fingers on the&#xA;keyboard quite like it, except &lt;code&gt;gitui&lt;/code&gt; which comes with some great ways to very&#xA;quickly walk through a git project.&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;Go to their [releases]https://github.com/extrawurst/gitui/releases) page,&#xA;download the latest build, and pop it on your PATH.  I have the following&#xA;stuffed away in some install scripts to get the latest version.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;small&gt;install latest release&lt;/small&gt;&lt;/em&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;nv&#34;&gt;GITUI_VERSION&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;curl --silent https://github.com/extrawurst/gitui/releases/latest &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; tr -d &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;#34;&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/^.*tag\///g&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/&amp;gt;.*$//g&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/^v//&amp;#39;&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;wget https://github.com/extrawurst/gitui/releases/download/v&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;GITUI_VERSION&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;/gitui-linux-musl.tar.gz -O- -q &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sudo tar -zxf - -C /usr/bin/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;run-gitui&#34;&gt;run &lt;code&gt;gitui&lt;/code&gt; &lt;a href=&#34;#run-gitui&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;It opens blazing fast.&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;gitui&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;quick-commits&#34;&gt;Quick Commits &lt;a href=&#34;#quick-commits&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Sometimes I edit a number of files and want to commit them one at a time, this&#xA;is painful in the git cli and my main use case for &lt;code&gt;gitui&lt;/code&gt;.  &lt;code&gt;gitui&lt;/code&gt; shows&#xA;unstaged changes at the top, staged changes on the bottom, and a diff on the&#xA;right.&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&lt;a href=&#34;https://images.waylonwalker.com/gitui-status.png&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;glightbox&#34; src=&#34;https://images.waylonwalker.com/gitui-status.png&#34; alt=&#34;gitui status&#34;/ data-glightbox=&#34;description: gitui status&#34;&gt;&lt;/a&gt;&#xA;&lt;/figure&gt;&#xA;&lt;h2 id=&#34;navigate-with-hjkl&#34;&gt;Navigate with hjkl &lt;a href=&#34;#navigate-with-hjkl&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;By default, &lt;code&gt;gitui&lt;/code&gt; uses arrow keys, but simply copying&#xA;&lt;a href=&#34;https://github.com/extrawurst/gitui/blob/master/vim_style_key_config.ron&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/github.com.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/github.com.ico&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;vim_style_key_config.ron&lt;/a&gt;&#xA;to your config directory will get you vim-like keybindings.&lt;/p&gt;&#xA;&lt;h2 id=&#34;workflow&#34;&gt;workflow &lt;a href=&#34;#workflow&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;pop open &lt;code&gt;gitui&lt;/code&gt;,&lt;/li&gt;&#xA;&lt;li&gt;use &lt;strong&gt;j/k&lt;/strong&gt; to get to the file I want to commit,&lt;/li&gt;&#xA;&lt;li&gt;glance at the diff to the right&lt;/li&gt;&#xA;&lt;li&gt;press enter to stage the file&lt;/li&gt;&#xA;&lt;li&gt;sc to switch focus to the saged files and commit&lt;/li&gt;&#xA;&lt;li&gt;write my commit message hit enter and&lt;/li&gt;&#xA;&lt;li&gt;q to quit&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;keybindings&#34;&gt;Keybindings &lt;a href=&#34;#keybindings&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;w/s:   to toggle focus between working and staged changes&#xA;j/k:   to scroll each section&#xA;h/l:   switch between left and right side&#xA;enter: toggle file from working or staging&#xA;c:     start a commit message&#xA;p:     push&#xA;&amp;lt;c-c&amp;gt;: quit&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;other-panes&#34;&gt;Other Panes &lt;a href=&#34;#other-panes&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I am in the &lt;code&gt;Status [1]&lt;/code&gt; pane 90% of the time, but it also has three other&#xA;panes for &lt;code&gt;Log [2]&lt;/code&gt;, &lt;code&gt;Stashing [3]&lt;/code&gt;, and &lt;code&gt;Stashes [4]&lt;/code&gt;.  I do not really use&#xA;the stashes panes, but the &lt;code&gt;Log [2]&lt;/code&gt; pane is quite useful to quickly go through&#xA;the last set of commits and see the diff for each of them.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-ui-do-you-use-for-git&#34;&gt;What UI do you use for git &lt;a href=&#34;#what-ui-do-you-use-for-git&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Let me know what ui you use for git, do you stick to the cli, use a gui, or use&#xA;a similar &lt;code&gt;TUI&lt;/code&gt; interface?&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Gitui is a blazing fast terminal git interface</title>
    <id>https://go.waylonwalker.com/gitui/</id>
    <updated>2021-01-17T00:00:00Z</updated>
    <published>2021-01-17T00:00:00Z</published>
    <link href="https://go.waylonwalker.com/gitui/" rel="alternate" type="text/html"></link>
    <summary type="text">Gitui is a terminal-based git user interface (TUI) that will change the way that you work with git. I have been a long-time user of the git cli, and it&#39;s...</summary>
    <content type="html">&lt;p&gt;Gitui is a terminal-based &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; user interface (TUI) that will change the way&#xA;that you work with git. I have been a long-time user of the git cli, and it’s&#xA;been hard to beat, mostly because there is nothing that keeps my fingers on the&#xA;keyboard quite like it, except &lt;code&gt;gitui&lt;/code&gt; which comes with some great ways to very&#xA;quickly walk through a git project.&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;Go to their [releases]https://github.com/extrawurst/gitui/releases) page,&#xA;download the latest build, and pop it on your PATH.  I have the following&#xA;stuffed away in some install scripts to get the latest version.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;small&gt;install latest release&lt;/small&gt;&lt;/em&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;nv&#34;&gt;GITUI_VERSION&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;curl --silent https://github.com/extrawurst/gitui/releases/latest &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; tr -d &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;#34;&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/^.*tag\///g&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/&amp;gt;.*$//g&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/^v//&amp;#39;&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;wget https://github.com/extrawurst/gitui/releases/download/v&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;GITUI_VERSION&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;/gitui-linux-musl.tar.gz -O- -q &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sudo tar -zxf - -C /usr/bin/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;run-gitui&#34;&gt;run &lt;code&gt;gitui&lt;/code&gt; &lt;a href=&#34;#run-gitui&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;It opens blazing fast.&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;gitui&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;quick-commits&#34;&gt;Quick Commits &lt;a href=&#34;#quick-commits&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Sometimes I edit a number of files and want to commit them one at a time, this&#xA;is painful in the git cli and my main use case for &lt;code&gt;gitui&lt;/code&gt;.  &lt;code&gt;gitui&lt;/code&gt; shows&#xA;unstaged changes at the top, staged changes on the bottom, and a diff on the&#xA;right.&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&lt;a href=&#34;https://images.waylonwalker.com/gitui-status.png&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;glightbox&#34; src=&#34;https://images.waylonwalker.com/gitui-status.png&#34; alt=&#34;gitui status&#34;/ data-glightbox=&#34;description: gitui status&#34;&gt;&lt;/a&gt;&#xA;&lt;/figure&gt;&#xA;&lt;h2 id=&#34;navigate-with-hjkl&#34;&gt;Navigate with hjkl &lt;a href=&#34;#navigate-with-hjkl&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;By default, &lt;code&gt;gitui&lt;/code&gt; uses arrow keys, but simply copying&#xA;&lt;a href=&#34;https://github.com/extrawurst/gitui/blob/master/vim_style_key_config.ron&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/github.com.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/github.com.ico&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;vim_style_key_config.ron&lt;/a&gt;&#xA;to your config directory will get you vim-like keybindings.&lt;/p&gt;&#xA;&lt;h2 id=&#34;workflow&#34;&gt;workflow &lt;a href=&#34;#workflow&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Generally, I pop open &lt;code&gt;gitui&lt;/code&gt;, use j/k to get to the file I want to commit,&#xA;glance at the diff to the right, press enter to stage the file, sc to switch&#xA;focus to the saged files and commit, write my commit message hit enter and&#xA;done.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;w/s:   to toggle focus between working and staged changes&lt;/li&gt;&#xA;&lt;li&gt;j/k:   to scroll each section&lt;/li&gt;&#xA;&lt;li&gt;h/l:   switch between left and right side&lt;/li&gt;&#xA;&lt;li&gt;enter: toggle file from working or staging&lt;/li&gt;&#xA;&lt;li&gt;c:     start a commit message&lt;/li&gt;&#xA;&lt;li&gt;p:     push&lt;/li&gt;&#xA;&lt;li&gt;&lt;c-c&gt;: quit&lt;/c-c&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;other-panes&#34;&gt;Other Panes &lt;a href=&#34;#other-panes&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I am in the &lt;code&gt;Status [1]&lt;/code&gt; pane 90% of the time, but it also has three other&#xA;panes for &lt;code&gt;Log [2]&lt;/code&gt;, &lt;code&gt;Stashing [3]&lt;/code&gt;, and &lt;code&gt;Stashes [4]&lt;/code&gt;.  I do not really use&#xA;the stashes panes, but the &lt;code&gt;Log [2]&lt;/code&gt; pane is quite useful to quickly go through&#xA;the last set of commits and see the diff for each of them.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-ui-do-you-use-for-git&#34;&gt;What UI do you use for git &lt;a href=&#34;#what-ui-do-you-use-for-git&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Let me know what ui you use for git, do you stick to the cli, use a gui, or use&#xA;a similar &lt;code&gt;TUI&lt;/code&gt; interface?&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Fix git commit author</title>
    <id>https://go.waylonwalker.com/fix-git-commit-author/</id>
    <updated>2020-10-17T05:00:00Z</updated>
    <published>2020-10-17T05:00:00Z</published>
    <link href="https://go.waylonwalker.com/fix-git-commit-author/" rel="alternate" type="text/html"></link>
    <summary type="text">I was 20 commits into a hackoberfest PR when I suddenly realized they they all had my work email on them instead of my personal email 😱.</summary>
    <content type="html">&lt;p&gt;I was 20 commits into a hackoberfest PR when I suddenly realized they they all had my work email on them instead of my personal email 😱.  This is the story of how I corrected my email address on 19 individual commits after already submitting for a PR.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#change-the-email-for-this-repo&#34;&gt;Change the email for this repo&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#prepare-for-rebasing&#34;&gt;Prepare for rebasing&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#start-the-rebase&#34;&gt;start the rebase&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#fix-first-wrong-commit&#34;&gt;🛠 Fix First wrong Commit&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#fix-all-commits&#34;&gt;Fix all commits&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#done&#34;&gt;Done&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#recap&#34;&gt;ReCap&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;change-the-email-for-this-repo&#34;&gt;Change the email for this repo &lt;a href=&#34;#change-the-email-for-this-repo&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;stop the bleeding&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Before anything else set the email correctly!&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; kedro&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git config user.name &lt;span class=&#34;s2&#34;&gt;&amp;#34;Waylon Walker&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 config user.email quadmx08@gmail.com&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;prepare-for-rebasing&#34;&gt;Prepare for rebasing &lt;a href=&#34;#prepare-for-rebasing&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;First thing is to find how many commits back this mistake goes.  I opened up the &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; log, and saw mine went back 19 commits.  I rolled back 20 just to be sure.&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 log&#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;commit a355926b9d7ec4c05659adaa254beefbdb036332&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Author: WaylonWalker &amp;lt;email@work.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Sat Oct &lt;span class=&#34;m&#34;&gt;17&lt;/span&gt; 10:28:59 &lt;span class=&#34;m&#34;&gt;2020&lt;/span&gt; -0500&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    give name of &lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; inside incorrect parameters error&#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;commit 1756f5d121bd06c459560b2e982e0d7b6879e9ca&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Author: Kiyohito Kunii &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;Kiyo&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &amp;lt;8097799+921kiyo@users.noreply.github.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Fri Oct &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; 15:33:09 &lt;span class=&#34;m&#34;&gt;2020&lt;/span&gt; +0100&#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;    Fix docs reference &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; registering &lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;pipelines&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;start-the-rebase&#34;&gt;start the rebase &lt;a href=&#34;#start-the-rebase&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Now I start the rebase 20 commits back from HEAD.  THis will pop you into a text file with a list of commits, for this change simply replace all &lt;code&gt;pick&lt;/code&gt; with &lt;code&gt;edit&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;git rebase -i HEAD~20&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;note-for-the-first-commit&#34;&gt;Note for the first commit &lt;a href=&#34;#note-for-the-first-commit&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;If you want to rebase back to the start of the repo use the &lt;code&gt;--root&lt;/code&gt; flag.&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 rebase -i --root&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Run git log to see where we ended 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 log&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;commit 1756f5d121bd06c459560b2e982e0d7b6879e9ca&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Author: Kiyohito Kunii &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;Kiyo&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &amp;lt;8097799+921kiyo@users.noreply.github.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Fri Oct &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; 15:33:09 &lt;span class=&#34;m&#34;&gt;2020&lt;/span&gt; +0100&#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;    Fix docs reference &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; registering &lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;pipelines&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As expected we ended up on Kiyo’s commit. So we can simply move forward without any edits.&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 rebase --continue&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Stopped at e162ca7...  correct &lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; name in tests&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;You can amend the commit now, 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 commit --amend&#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;Once you are satisfied with your changes, run&#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 rebase --continue&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;-fix-first-wrong-commit&#34;&gt;🛠 Fix First wrong Commit &lt;a href=&#34;#-fix-first-wrong-commit&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Checking the log again I an now on my first commit with a mistake.&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 log&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;commit 95c209a740d6d0340e19a8fc36298cbf874f8bf7 &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;HEAD&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;Author: WaylonWalker &amp;lt;email@work.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Sat Oct &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt; 11:59:44 &lt;span class=&#34;m&#34;&gt;2020&lt;/span&gt; -0500&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    correct &lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; name in tests&#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;commit cde2e8baa3c1c4a9f1da4135258381466b1da40a&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Author: Waylon Walker &amp;lt;quadmx08@gmail.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Sat Oct &lt;span class=&#34;m&#34;&gt;17&lt;/span&gt; 10:30:07 &lt;span class=&#34;m&#34;&gt;2020&lt;/span&gt; -0500&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    update tests&#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;commit a355926b9d7ec4c05659adaa254beefbdb036332&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Author: Waylon Walker &amp;lt;quadmx08@gmail.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Sat Oct &lt;span class=&#34;m&#34;&gt;17&lt;/span&gt; 10:28:59 &lt;span class=&#34;m&#34;&gt;2020&lt;/span&gt; -0500&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    give name of &lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; inside incorrect parameters error&#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;commit 1756f5d121bd06c459560b2e982e0d7b6879e9ca&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Author: Kiyohito Kunii &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;Kiyo&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &amp;lt;8097799+921kiyo@users.noreply.github.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Fri Oct &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; 15:33:09 &lt;span class=&#34;m&#34;&gt;2020&lt;/span&gt; +0100&#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;    Fix docs reference &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; registering &lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;pipelines&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Running the following command will reset the author on the current commit.&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 commit --amend --reset-author&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Double check with a quick &lt;code&gt;git log&lt;/code&gt; that the author was fixed.&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;commit ccaaa56059ee4554731fa83297ca9e8e387a7592 &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;HEAD&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;Author: Waylon Walker &amp;lt;quadmx08@gmail.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Sat Oct &lt;span class=&#34;m&#34;&gt;17&lt;/span&gt; 10:35:40 &lt;span class=&#34;m&#34;&gt;2020&lt;/span&gt; -0500&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    correct &lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; name in tests&#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;commit cde2e8baa3c1c4a9f1da4135258381466b1da40a&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Author: Waylon Walker &amp;lt;quadmx08@gmail.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Sat Oct &lt;span class=&#34;m&#34;&gt;17&lt;/span&gt; 10:30:07 &lt;span class=&#34;m&#34;&gt;2020&lt;/span&gt; -0500&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    update tests&#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;commit a355926b9d7ec4c05659adaa254beefbdb036332&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Author: Waylon Walker &amp;lt;quadmx08@gmail.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Sat Oct &lt;span class=&#34;m&#34;&gt;17&lt;/span&gt; 10:28:59 &lt;span class=&#34;m&#34;&gt;2020&lt;/span&gt; -0500&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    give name of &lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; inside incorrect parameters error&#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;commit 1756f5d121bd06c459560b2e982e0d7b6879e9ca&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Author: Kiyohito Kunii &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;Kiyo&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &amp;lt;8097799+921kiyo@users.noreply.github.com&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Date:   Fri Oct &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; 15:33:09 &lt;span class=&#34;m&#34;&gt;2020&lt;/span&gt; +0100&#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;    Fix docs reference &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; registering &lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;pipelines&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;fix-all-commits&#34;&gt;Fix all commits &lt;a href=&#34;#fix-all-commits&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Now to do this for 18 other commits.  I found that chaining the three commands into a bash one-liner was quite helpful.  I turned off pre-commit hooks with &lt;code&gt;--no-verify&lt;/code&gt;.  I also turned off the &lt;code&gt;log&lt;/code&gt; pager by adding &lt;code&gt;--no-pager&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;git rebase --continue &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&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;git commit --amend --reset-author --no-edit --no-verify &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&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;git --no-pager log -n &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;done&#34;&gt;Done &lt;a href=&#34;#done&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;This was quick and easy for 19 commits.  I have tried to loop through changes like this in the past, and it does get a bit hairy.  I find its easier to just setup a one-liner and crank through them one by one.&lt;/p&gt;&#xA;&lt;h2 id=&#34;a-note-on-changing-history&#34;&gt;A note on changing history… &lt;a href=&#34;#a-note-on-changing-history&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Since this was done in a rebase it has changed the history of the repo.  This is ok to do only when you are the only person or are in close communication with everyone using the repo.  One thing I have ran into is that if you do this after you submit a PR, but before its completed it duplicates your commits in a merge.  For this particular change I simply closed the first PR and opened a second.  If someone has a better suggestion, I would be glad to know a better way.&lt;/p&gt;&#xA;&lt;h2 id=&#34;recap&#34;&gt;ReCap &lt;a href=&#34;#recap&#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;nb&#34;&gt;cd&lt;/span&gt; kedro&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git config user.name &lt;span class=&#34;s2&#34;&gt;&amp;#34;Waylon Walker&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 config user.email quadmx08@gmail.com&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git log&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git rebase -i HEAD~20&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git log&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git rebase --continue&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git log&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git rebase --continue &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; git commit --amend --reset-author --no-edit --no-verify &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; git --no-pager log -n &lt;span class=&#34;m&#34;&gt;3&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>List the latest files to change in a git repo</title>
    <id>https://go.waylonwalker.com/last-n-git-files/</id>
    <updated>2020-10-08T05:00:00Z</updated>
    <published>2020-10-08T05:00:00Z</published>
    <link href="https://go.waylonwalker.com/last-n-git-files/" rel="alternate" type="text/html"></link>
    <content type="html">&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;k&#34;&gt;while&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;read&lt;/span&gt; file&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;git log --pretty&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;format:%ad -n &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; --date&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;raw -- &lt;span class=&#34;nv&#34;&gt;$file&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$file&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;done&lt;/span&gt; &amp;lt; &amp;lt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;git ls-tree -r --name-only HEAD &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep static/stories&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sort -r &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; head -n &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; cut -d &lt;span class=&#34;s2&#34;&gt;&amp;#34; &amp;#34;&lt;/span&gt; -f &lt;span class=&#34;m&#34;&gt;3&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>Strip Trailing Whitespace from Git projects</title>
    <id>https://go.waylonwalker.com/strip-trailing-whitespace/</id>
    <updated>2020-09-30T05:00:00Z</updated>
    <published>2020-09-30T05:00:00Z</published>
    <link href="https://go.waylonwalker.com/strip-trailing-whitespace/" rel="alternate" type="text/html"></link>
    <summary type="text">A common linting error thrown by various linters is for trailing whitespace. I most often use flake8. I generally have pre-commit hooks setup to strip this,...</summary>
    <content type="html">&lt;p&gt;A common linting error thrown by various linters is for trailing whitespace.  I&#xA;most often use flake8.  I generally have&#xA;[pre-commit](&lt;a href=&#34;https://waylonwalker.com/pre-commit-is-awesome/&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/waylonwalker.com.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/waylonwalker.com.ico&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;https://waylonwalker.com/pre-commit-is-awesome&lt;/a&gt;&#xA;hooks setup to strip this,&#xA;but sometimes I run into situations where I jump into a project without it, and&#xA;my editor lights up with errors.  A simple fix is to run this one-liner.&lt;/p&gt;&#xA;&lt;h2 id=&#34;one-liner-to-strip-whitespace&#34;&gt;One-Liner to strip whitespace &lt;a href=&#34;#one-liner-to-strip-whitespace&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;small&gt;&lt;mark&gt;bash&lt;/mark&gt;&lt;/small&gt;&lt;/em&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;git grep -I --name-only -z -e &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; xargs -0 sed -i -e &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/[ \t]\+\(\r\?\)$/\1/&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&#34;text-align: center&#34; align=&#34;center&#34;&gt;&#xA;&lt;a href=&#34;https://waylonwalker.com/pre-commit-is-awesome&#34;&gt;&#xA;  &lt;img class=&#34;glightbox&#34; style=&#34;width:400px; max-width:80%; margin: auto;&#34; width=&#34;400&#34; src=&#34;https://images.waylonwalker.com/pre-commit-is-awesome.png&#34; alt=&#34;pre-commit article&#34;/ data-glightbox=&#34;description: pre-commit article&#34;&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;read more about how  &lt;a href=&#34;/pre-commit-is-awesome/&#34; class=&#34;wikilink&#34; data-title=&#34;pre-commit is awesome&#34; data-description=&#34;I recently discovered the ✨ awesomeness that is pre-commit. I steered away from it for so long because it seemed like a big daunting thing to set up, but...&#34; data-date=&#34;2020-06-05&#34; data-preview=&#34;I recently discovered the ✨ awesomeness that is pre-commit. I steered away from it for so long because it seemed like a big daunting thing to set up, but...&#34;&gt;pre-commit is awesome&lt;/a&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>Rename your Master Branch</title>
    <id>https://go.waylonwalker.com/014/</id>
    <updated>2020-06-12T02:12:24Z</updated>
    <published>2020-06-12T02:12:24Z</published>
    <link href="https://go.waylonwalker.com/014/" rel="alternate" type="text/html"></link>
    <content type="html">&lt;h1 id=&#34;rename-your-master-branch&#34;&gt;Rename your Master Branch&lt;/h1&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 -m master main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git push -u origin main&#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>Master No More</title>
    <id>https://go.waylonwalker.com/master-no-more/</id>
    <updated>2020-06-11T05:00:00Z</updated>
    <published>2020-06-11T05:00:00Z</published>
    <link href="https://go.waylonwalker.com/master-no-more/" rel="alternate" type="text/html"></link>
    <summary type="text">It&#39;s been a long time coming. We use some very harsh language within tech so much sometimes that we become numb to it. It&#39;s time to do my very small part in...</summary>
    <content type="html">&lt;p&gt;It’s been a long time coming.  We use some very harsh language within tech so&#xA;much sometimes that we become numb to it.  It’s time to do my very small part&#xA;in this movement and purge this language from my active repos starting with&#xA;this blog right here.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;/refactor-in-cli/&#34; class=&#34;wikilink&#34; data-title=&#34;Large Refactor At The Command Line&#34; data-description=&#34;As projects grow patterns that worked early on break and we need to change things to make the project easier to work with, and more welcoming to new developers.&#34; data-date=&#34;2020-12-30&#34; data-preview=&#34;As projects grow patterns that worked early on break and we need to change things to make the project easier to work with, and more welcoming to new developers.&#34;&gt;Large Refactor At The Command Line&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;this post follows my method of refactoring code bases from the command line,&#xA;read more about that in this article.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;c-s-f&#34;&gt;c-s-f &lt;a href=&#34;#c-s-f&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;First off browsing through the content of my blog I found many references to master.  I cannot completely whole-sale find and replace each one of them, because some of them are links that I do not own.  Any set of instructions got upgraded from &lt;code&gt;master&lt;/code&gt; to &lt;code&gt;main&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;gd&#34;&gt;-  git checkout master&#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;gd&#34;&gt;&lt;/span&gt;&lt;span class=&#34;gi&#34;&gt;+  git checkout main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There were countless cases of examples like this to comb through, but it feels good to have them purged of old language.&lt;/p&gt;&#xA;&lt;h2 id=&#34;rename-routes&#34;&gt;rename routes &lt;a href=&#34;#rename-routes&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Following yesterdays post, I am going to rename my markdown files&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;/static/_redirects&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;shorteners&#34;&gt;shorteners &lt;a href=&#34;#shorteners&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&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;gd&#34;&gt;- /gdfm              /blog/today-i-learned-git-diff-feature-master/&#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;gd&#34;&gt;- /blog/gdfm         /blog/today-i-learned-git-diff-feature-master/&#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;gd&#34;&gt;&lt;/span&gt;&lt;span class=&#34;gi&#34;&gt;+ /gdfm              /blog/today-i-learned-git-diff-feature-main/&#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;gi&#34;&gt;+ /blog/gdfm         /blog/today-i-learned-git-diff-feature-main/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;redirect-posts&#34;&gt;redirect posts &lt;a href=&#34;#redirect-posts&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&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;gi&#34;&gt;+ # master -&amp;gt; main&#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;gi&#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;gi&#34;&gt;+ /blog/today-i-learned-git-diff-feature-master/   /blog/git-diff-feature-main/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;redirect-external-links-to-repo&#34;&gt;redirect external links to repo &lt;a href=&#34;#redirect-external-links-to-repo&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&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;gd&#34;&gt;- /redirects      https://github.com/WaylonWalker/waylonwalkerv2/edit/master/static/_redirects&#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;gd&#34;&gt;&lt;/span&gt;&lt;span class=&#34;gi&#34;&gt;+ /redirects      https://github.com/WaylonWalker/waylonwalkerv2/edit/main/static/_redirects&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;More info on refactoring your blog routes with netlify here.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://waylonwalker.com/gracefully-redirect/&#34;&gt;&lt;img class=&#34;glightbox&#34; src=&#34;https://images.waylonwalker.com/gracefully-redirect.png&#34; alt=&#34;gracefully redirect cover image&#34;/ data-glightbox=&#34;description: gracefully redirect cover image&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;-edit-this-post--links&#34;&gt;&lt;em&gt;“Edit This post”&lt;/em&gt; Links &lt;a href=&#34;#-edit-this-post--links&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I literally just added &lt;em&gt;“edit this post”&lt;/em&gt; links to my rss feed and my blog feed.  This was a simple find and replace inside of my blog template and &lt;code&gt;gatsby-config.js&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;dont-forget-about-ci&#34;&gt;Don’t Forget about CI &lt;a href=&#34;#dont-forget-about-ci&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;If you have build/deploy processes that specifically run on master or not on master dont forget to change those to main.  I did everything in a single commit and as soon as I pushed to main it started deploying gloriously.&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;name: 🌱 Deploy site&#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;on:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  push:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    branches:&#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;gd&#34;&gt;-      - master&#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;gd&#34;&gt;&lt;/span&gt;&lt;span class=&#34;gi&#34;&gt;+      - main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;now-the-fun-part&#34;&gt;Now the fun part &lt;a href=&#34;#now-the-fun-part&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;removing &lt;strong&gt;master&lt;/strong&gt; completely&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;I mostly just followed this &lt;a href=&#34;https://www.hanselman.com/blog/easily-rename-your-git-default-branch-from-master-to-main&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/www.hanselman.com.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/www.hanselman.com.ico&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;post by Scott Hanselman&lt;/a&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;git branch -m master main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git push -u origin main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then from GitHub go to settings&amp;gt;default branch&amp;gt; select main and accept the risk involved.&lt;/p&gt;&#xA;&lt;p&gt;After your default is set to main, you have no use for master in your life anymore, time to purge it completely once and for all.  Go to &lt;repo&gt;/branches and trash it.&lt;/repo&gt;&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&lt;a href=&#34;https://images.waylonwalker.com/delete-master.png&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;glightbox&#34; src=&#34;https://images.waylonwalker.com/delete-master.png&#34; alt=&#34;delete master&#34;/ data-glightbox=&#34;description: delete master&#34;&gt;&lt;/a&gt;&#xA;&lt;/figure&gt;&#xA;&lt;h2 id=&#34;stop-the-bleeding&#34;&gt;Stop the Bleeding &lt;a href=&#34;#stop-the-bleeding&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I like how Scott included this nice alias for starting from main from the beginning.&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 alias.new &lt;span class=&#34;s1&#34;&gt;&amp;#39;!git init &amp;amp;&amp;amp; git symbolic-ref HEAD refs/heads/main&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-the-full-diff&#34;&gt;See the Full Diff &lt;a href=&#34;#see-the-full-diff&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;If you happen to want to see the full diff of my change you can see it &lt;a href=&#34;https://github.com/WaylonWalker/waylonwalkerv2/commit/4bd26ba8faaf7c72e01cc4946d989e3284302cd0&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/github.com.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/github.com.ico&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;here&lt;/a&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>008</title>
    <id>https://go.waylonwalker.com/008/</id>
    <updated>2020-06-07T01:58:03Z</updated>
    <published>2020-06-07T01:58:03Z</published>
    <link href="https://go.waylonwalker.com/008/" rel="alternate" type="text/html"></link>
    <summary type="text">compare _ branch to _ with ** cli</summary>
    <content type="html">&lt;p&gt;compare &lt;em&gt;feature&lt;/em&gt; branch to &lt;em&gt;main&lt;/em&gt; with &lt;strong&gt;&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;&lt;/strong&gt; cli&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 main..feature&#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>006</title>
    <id>https://go.waylonwalker.com/006/</id>
    <updated>2020-06-06T18:14:14Z</updated>
    <published>2020-06-06T18:14:14Z</published>
    <link href="https://go.waylonwalker.com/006/" rel="alternate" type="text/html"></link>
    <summary type="text">Setup ** for _</summary>
    <content type="html">&lt;p&gt;Setup &lt;strong&gt;pre-commit&lt;/strong&gt; for &lt;em&gt;isort&lt;/em&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;w&#34;&gt;  &lt;/span&gt;- &lt;span class=&#34;nt&#34;&gt;repo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;https://github.com/asottile/seed-isort-config&lt;/span&gt;&lt;span class=&#34;w&#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;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;rev&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;v2.1.1&lt;/span&gt;&lt;span class=&#34;w&#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;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;hooks&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#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;w&#34;&gt;      &lt;/span&gt;- &lt;span class=&#34;nt&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;seed-isort-config&lt;/span&gt;&lt;span class=&#34;w&#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;w&#34;&gt;  &lt;/span&gt;- &lt;span class=&#34;nt&#34;&gt;repo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;https://github.com/pre-commit/mirrors-isort&lt;/span&gt;&lt;span class=&#34;w&#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;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;rev&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;v4.3.21&lt;/span&gt;&lt;span class=&#34;w&#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;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;hooks&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#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;w&#34;&gt;      &lt;/span&gt;- &lt;span class=&#34;nt&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;isort&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;em&gt;includes automatic&lt;/em&gt; .isort-config&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>005</title>
    <id>https://go.waylonwalker.com/005/</id>
    <updated>2020-06-06T18:12:10Z</updated>
    <published>2020-06-06T18:12:10Z</published>
    <link href="https://go.waylonwalker.com/005/" rel="alternate" type="text/html"></link>
    <summary type="text">** setup is _</summary>
    <content type="html">&lt;p&gt;&lt;strong&gt;pre-commit&lt;/strong&gt; setup is &lt;em&gt;simple&lt;/em&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;pip instal pre-commit&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pre-commit sample-config &amp;gt; .pre-commit-config.yaml&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pre-commit install&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git add .&#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;added pre-commit&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Try&lt;/strong&gt; it yourself&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Maintianing multiple git remotes</title>
    <id>https://go.waylonwalker.com/maintianing-multiple-git-remotes/</id>
    <updated>2020-05-07T11:56:00Z</updated>
    <published>2020-05-07T11:56:00Z</published>
    <link href="https://go.waylonwalker.com/maintianing-multiple-git-remotes/" rel="alternate" type="text/html"></link>
    <content type="html">&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 remote -v&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git remote add gitlab &amp;lt;url&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git push gitlab main&#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>Today I learned `git diff feature..main`</title>
    <id>https://go.waylonwalker.com/git-diff-branches/</id>
    <updated>2020-03-03T11:58:00Z</updated>
    <published>2020-03-03T11:58:00Z</published>
    <link href="https://go.waylonwalker.com/git-diff-branches/" rel="alternate" type="text/html"></link>
    <summary type="text">Sometimes we get a little happy and mistakenly commit something that we just cant figure out. This is a good way to figure out what the heck has changed on the current branch compared to any other branch.</summary>
    <content type="html">&lt;p&gt;Today I learned how to diff between two branches.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git diff feature..main&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Sometimes we get a little &lt;code&gt;git add . &amp;amp;&amp;amp; git commit -m &amp;#34;WIP&amp;#34;&lt;/code&gt; happy and mistakenly commit something that we just can’t figure out. This is a good way to figure out what the heck has changed on the current branch compared to any other branch.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example &lt;a href=&#34;#example&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Let’s create a new directory, initialize &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; and toss some content into a readme.&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;mkdir git-diff&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git init&#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;hello there&amp;#34;&lt;/span&gt; &amp;gt; readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git add . &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;hello there&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;cat readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After all of that, we have a git repository on our local machine with a single file &lt;code&gt;readme.md&lt;/code&gt; that contains the following.&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;hello there&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;create-a-branch-and--edit&#34;&gt;Create a branch and ✍ edit &lt;a href=&#34;#create-a-branch-and--edit&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Let’s checkout a new branch called Waylon and change the word &lt;code&gt;there&lt;/code&gt; to &lt;code&gt;Waylon&lt;/code&gt; in our &lt;code&gt;readme.md&lt;/code&gt; file, then diff it.&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 Waylon&#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;hello Waylon&amp;#34;&lt;/span&gt; &amp;gt; readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git add . &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;hello Waylon&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 diff&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gd&#34;&gt;- hello there&#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;gd&#34;&gt;&lt;/span&gt;&lt;span class=&#34;gi&#34;&gt;+ hello waylon&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At this point we have one commit.  Things are really straightforward, and our diff will be the same between the last commit and the main branch since.  Let’s make another commit by adding the 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;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;hello waylon\n\n&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &amp;gt; readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cat readme.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git diff&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;hello Waylon&#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;gi&#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;gi&#34;&gt;+ Fri 13 Mar 2020 04:23:21 PM DST&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;👆 At this point, our diff doesn’t tell us the whole story between our current state and main, only between our current state and our last commit.  Let’s commit our changes and compare our branch to main.&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 add . &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;add date&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 diff main..waylon&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gd&#34;&gt;- hello there&#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;gd&#34;&gt;&lt;/span&gt;&lt;span class=&#34;gi&#34;&gt;+ hello Waylon&#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;gi&#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;gi&#34;&gt;+ Fri 13 Mar 2020 03:43:21 PM DST&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;git-is-powerful&#34;&gt;Git is powerful &lt;a href=&#34;#git-is-powerful&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I learn small tricks like this often with git.  Many times I forget about it and have to come back to re-learn. Sharing my thoughts gives me a better chance of remembering.&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>git push without setting upstream</title>
    <id>https://go.waylonwalker.com/git-push-without-setting-upstream/</id>
    <updated>2020-02-04T12:18:00Z</updated>
    <published>2020-02-04T12:18:00Z</published>
    <link href="https://go.waylonwalker.com/git-push-without-setting-upstream/" rel="alternate" type="text/html"></link>
    <summary type="text">Finally after years of hand typing out a full I found there is a setting to automatcally push to the current branch. More realisitically I just did a let git...</summary>
    <content type="html">&lt;p&gt;Finally after years of hand typing out a full &lt;code&gt;git push --upstream my_really_long_and_descriptive_branch_name&lt;/code&gt; I found there is a setting to&#xA;automatcally push to the current branch. More realisitically I just did a &lt;code&gt;git push&lt;/code&gt; let &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; yell at me, and copying the suggestion.&lt;/p&gt;&#xA;&lt;h2 id=&#34;git-config&#34;&gt;git config &lt;a href=&#34;#git-config&#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 config --global push.default current&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This one setting will now &lt;code&gt;git push&lt;/code&gt; to the current branch without yelling at&#xA;you that your upstream does not match your current branch.  This helps me ship&#xA;chnages faster as I am constantly chnaging projects and branches.&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Realistic Git Workflow</title>
    <id>https://go.waylonwalker.com/realistic-git-workflow/</id>
    <updated>2019-05-27T00:00:00Z</updated>
    <published>2019-05-27T00:00:00Z</published>
    <link href="https://go.waylonwalker.com/realistic-git-workflow/" rel="alternate" type="text/html"></link>
    <summary type="text">My git workflow based on real life. Its not always clean and simple.</summary>
    <content type="html">&lt;p&gt;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; workflow based on real life.  Its  not always clean and simple.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;sometimes things get messy&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-clean-path&#34;&gt;The Clean Path &lt;a href=&#34;#the-clean-path&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;figure&gt;&#xA;&lt;a href=&#34;https://images.waylonwalker.com/akira-hojo-652732-unsplash.jpg&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;glightbox&#34; src=&#34;https://images.waylonwalker.com/akira-hojo-652732-unsplash.jpg&#34; alt=&#34;&#34;/ data-glightbox=&#34;description: &#34;&gt;&lt;/a&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;&lt;strong&gt;pull 👉 branch 👉 format 👉 work👉 add 👉 commit 👉 pull 👉 rebase 👉 push&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;iframe src=&#34;./clean&#34; height=&#34;400&#34; width=&#34;800&#34; frameborder=&#34;None,&#34;&gt;&#xA;&lt;h3 id=&#34;pull&#34;&gt;Pull &lt;a href=&#34;#pull&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;As complicated as that seems it is pretty straight forward.  When you sit down to work the first thing you do is to &lt;strong&gt;pull&lt;/strong&gt; down the teams latest working &amp;ldquo;develop&amp;rdquo; branch from git.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git checkout develop&#xA;git pull&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;branch&#34;&gt;Branch &lt;a href=&#34;#branch&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Next create a new branch with a name that will remind you of what you are working on.  For your own sanity choose something descriptive. It is easy to get too many similar branches going and forget which branch is which.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git checkout -b ingest_product_id_table&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;format&#34;&gt;Format &lt;a href=&#34;#format&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;If you know which files in existance that you will be editing before you start work it is a good idea to format them in a commit early on to keep your working commits separate from formatting.  This will make it easier for reviewers to distinguish from your changes and formatting fixes.&lt;/p&gt;&#xA;&lt;p&gt;If your team agrees to a consistent formatting logic, sticks to it and always remembers to run the linting/fixing tools you should not have anything to  change.  But thats not what this post is about, its about the real world.  People forget to run linters, some don&amp;rsquo;t care, some may not even be aware of the teams formatting guidelines.  Talk to your team about these things and get on the same page.&lt;/p&gt;&#xA;&lt;p&gt;I care about formatting, we all should.  We want to put out the best work we can in  our craft.  Realistically though I dont really care about nit picky stuff, I just want things consistant so that it makes things easier to read without me taking the time to swap  out quotes, and fix line spacing. I want a tool to do it for me, and when that tool runs I dont want it mixing in the same commit as my work.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;black .&#xA;git add .&#xA;git commit -m &amp;quot;FIX formatted with black&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;work&#34;&gt;Work &lt;a href=&#34;#work&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Make your changes to your code, test them, document them, clean it up, do what you do best.&lt;/p&gt;&#xA;&lt;h3 id=&#34;add-and-commit&#34;&gt;add and commit &lt;a href=&#34;#add-and-commit&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Next you will need to stage files that have changed for commit, and commit them.  This can be done in stages to make it clear what the progression was to finish the task you were assigned.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;add all files&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;    git add .&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;strong&gt;add a single file&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git add &amp;quot;path/to/myfile.ext&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;strong&gt;one line commit message&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Here make sure that you create clear messages so that others know.  There are whole posts out there showing how to better write clear commit messages and why you should, check out those posts for more information.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git commit -m &amp;quot;FEAT ingested product id table on pipeline&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;strong&gt;multi-line commit message&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you want some more information in your commit message run &lt;code&gt;git commit&lt;/code&gt; without &lt;code&gt;-m&lt;/code&gt; and it will pop you into your configured git editor, which is vim by default.&lt;/p&gt;&#xA;&lt;h3 id=&#34;super-quick-vim-primer&#34;&gt;Super quick vim primer &lt;a href=&#34;#super-quick-vim-primer&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;By default when you run &lt;code&gt;git commit&lt;/code&gt; you will pop into a vim editor and may want to throw your keyboard before you figure out exactly how to get out of the damn thing.  First type &lt;code&gt;i&lt;/code&gt; to insert text.  Type out your commit message. Then hit &lt;code&gt;esc&lt;/code&gt; followed by &lt;code&gt;:x&lt;/code&gt;.  This is the most basic things you need, and will get you through a commit message.  Vim is a whole topic on its own.&lt;/p&gt;&#xA;&lt;h3 id=&#34;integrate-your-changes&#34;&gt;Integrate your changes &lt;a href=&#34;#integrate-your-changes&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Now that you have made your changes and commited them its time to integrate them into the codebase so that everyone else can see them.  It is likely that time has gone by, and others have made changes to the codebase since you have, so you will want to pull those down first then switch back to your branch.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git checkout develop&#xA;git pull&#xA;git checkout ingest_product_id_table&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now you have the latest code changes and your work locally.  I prefer to rebase my work with the develop branch, pretending that I started my work after all of the other changes had occurred.  You can choose to merge, but I prefer not to have the extra merge commits in my PR.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git rebase develop&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;push&#34;&gt;push &lt;a href=&#34;#push&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Now its time to push out to the remote repository and create your PR.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git push --set-upstream ingest_product_id_table&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Open your repository in your web browser and you should see that you have just pushed to a new branch and a  button to open a Pull Request (PR).&lt;/p&gt;&#xA;&lt;h3 id=&#34;your-not-done-yet&#34;&gt;Your Not Done yet &lt;a href=&#34;#your-not-done-yet&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Opening a PR is not a done deal, it starts the conversation to get your code approved to be merged into the develop or main branch.  Your approver may have an idea to clean it up to make it more readable/maintainable, or something to make it more performant.  Remember that a second set of eyes sometimes has a new set of clarity that you do not as you have seen the work from start to end.  At this point they may request changes, discussion, or choose to accept and merge it in.&lt;/p&gt;&#xA;&lt;h2 id=&#34;realistically&#34;&gt;Realistically &lt;a href=&#34;#realistically&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;We all hit some pitfalls along the way&lt;/em&gt;&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&lt;a href=&#34;https://images.waylonwalker.com/ian-espinosa-177961-unsplash.jpg&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;glightbox&#34; src=&#34;https://images.waylonwalker.com/ian-espinosa-177961-unsplash.jpg&#34; alt=&#34;&#34; data-glightbox=&#34;description: &#34;&gt;&lt;/a&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;Things get dirty, the clean path is not always the path that is taken, but with git we can clean up our mess and make it look that way.&lt;/p&gt;&#xA;&lt;h2 id=&#34;i-started-working-from-maindevelop-before-branching&#34;&gt;I started working from main/develop before branching &lt;a href=&#34;#i-started-working-from-maindevelop-before-branching&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;Pitfall #1&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is my most common pitfall.  I get really excited to start work and jump right in.  Then when I go to make some commits I see that &lt;code&gt;main&lt;/code&gt; branch staring me right in the face from my bash prompt.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;stash those changes away&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git stash&#xA;git checkout -b feature_branch&#xA;git stash pop&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;strong&gt;want to see what changes you have stashed away&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git stash list&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;i-committed-to-the-wrong-branch&#34;&gt;I committed to the wrong branch &lt;a href=&#34;#i-committed-to-the-wrong-branch&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;Pitfall #2&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Create a new branch&lt;/strong&gt;&#xA;&lt;em&gt;Solution #1&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;It is common that I just forget to switch from the main/develop branch into my feature branch before starting work. You will first need to look at your &lt;code&gt;git log&lt;/code&gt; and determine how many commits to go back or a git hash to go back to.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;CAUTION&lt;/strong&gt; &lt;code&gt;git reset --hard&lt;/code&gt; will kill changes and you will never get them back if you did not first put them somewhere.  I myself have been burned by this command, there is no recovering from a &lt;strong&gt;hard&lt;/strong&gt; reset.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git log&#xA;# note commit hash or ~n to go back to&#xA;git branch feature_branch&#xA;git reset --hard HEAD ~3&#xA;# or&#xA;git reset --hard a1b2c4d4&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;strong&gt;Move to an Existing Branch&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Sometimes when juggling many different features we are in the middle of several branches and forget to switch between them.  If its the case that you already have a &lt;code&gt;feature_branch&lt;/code&gt; for the feature that you are working on, you can use this solution.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git status&#xA;# note current_branch&#xA;git checkout feature_branch&#xA;git merge current_branch&#xA;git reset --hard HEAD ~3&#xA;# or&#xA;git reset --hard a1b2c4d4&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;another-feature-was-complete-before-mine&#34;&gt;Another feature was complete before mine &lt;a href=&#34;#another-feature-was-complete-before-mine&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;pitfall #3&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;This can be a big matter of preference of how to deal with this just google &lt;code&gt;merge&lt;/code&gt; vs &lt;code&gt;rebase&lt;/code&gt;.  For this particular pitfall I prefer to &lt;strong&gt;&lt;code&gt;rebase&lt;/code&gt;&lt;/strong&gt;.  When you look at the git log and commit history it will appear as if you made your changes after everyone else made theirs.  I do this to clean up the PR and make it easier for the approver to read.  There will be less merge commits, and less history to try to understand.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Before pushing to the remote repository&lt;/strong&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;git fetch --all&#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;# or&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 develop&#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;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git checkout feature_branch&#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;# 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;git rebase develop&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;if its your first rodeo&lt;/strong&gt; or you are unsure how the rebase will go you can create a safty 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 branch saftey_feature_branch&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git fetch --all&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git rebase develop&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git branch -D safety_feature_branch &lt;span class=&#34;c1&#34;&gt;# deletes safety_feature_branch&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/iframe&gt;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>Rewrite History with Git</title>
    <id>https://go.waylonwalker.com/git-rewrite-history/</id>
    <updated>2019-02-05T00:00:00Z</updated>
    <published>2019-02-05T00:00:00Z</published>
    <link href="https://go.waylonwalker.com/git-rewrite-history/" rel="alternate" type="text/html"></link>
    <summary type="text">git commit --amend</summary>
    <content type="html">&lt;ul&gt;&#xA;&lt;li&gt;rebase&lt;/li&gt;&#xA;&lt;li&gt;&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; commit –amend&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;unstage&#34;&gt;Unstage &lt;a href=&#34;#unstage&#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 reset -- &amp;lt;file&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;rage&lt;/strong&gt; unstage to wipte out history of staged commit&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 reset --hard &amp;lt;file&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;undo-file&#34;&gt;Undo file &lt;a href=&#34;#undo-file&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;rage quit&lt;/li&gt;&#xA;&lt;li&gt;git reset HEAD~n &lt;file&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;removes modifications&lt;/li&gt;&#xA;&lt;li&gt;keeps hitsory of changes and undoes them&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/file&gt;&lt;/li&gt;&#xA;&lt;li&gt;git checkout HEAD~n – &lt;file&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;keeps modifications&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;removes history&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;–SOFT&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;–HARD&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;–Mixed&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/file&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;undo-n-commits-back&#34;&gt;undo n commits back &lt;a href=&#34;#undo-n-commits-back&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;locally before push&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 reset HEAD~n&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;after push&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 revert HEAD~n&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;update-gitignore&#34;&gt;update .gitignore &lt;a href=&#34;#update-gitignore&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;after push&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 rm -r --cached .&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git commit -am &lt;span class=&#34;s2&#34;&gt;&amp;#34;Updated .gitignore&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>Update Git User</title>
    <id>https://go.waylonwalker.com/git-update-user/</id>
    <updated>2019-01-21T00:00:00Z</updated>
    <published>2019-01-21T00:00:00Z</published>
    <link href="https://go.waylonwalker.com/git-update-user/" rel="alternate" type="text/html"></link>
    <summary type="text">This morning I log into my VCS and check activity on my projects to find that ** has been _ active on my projects fo the last few weeks. I quicklyhover over...</summary>
    <content type="html">&lt;p&gt;This morning I log into my VCS and check activity on my projects to find that &lt;strong&gt;someone else&lt;/strong&gt; has been &lt;em&gt;very&lt;/em&gt; active on my projects fo the last few weeks. I quicklyhover over the missing avatar to find that &lt;strong&gt;It’s Me&lt;/strong&gt;.  What’s wrong here, why do I look like two different people throughout the day!  upon further investigation I see the issue.  while setting up a new terminal environment I mistyped my email address by &lt;strong&gt;one character&lt;/strong&gt;.  After much searching and a few failed attempts I was able to fix it by following an article no longer available (2021) from &lt;a href=&#34;https://help.github.com/articles&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/help.github.com.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/help.github.com.ico&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;https://help.github.com/articles&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;bare-clone&#34;&gt;Bare Clone &lt;a href=&#34;#bare-clone&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Clone the repo, note it must be a &lt;code&gt;--bare&lt;/code&gt; clone.&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 clone --bare https://github.com/user/repo.git&#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;cd&lt;/span&gt; repo.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#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;-author-rewrite&#34;&gt;git-author-rewrite &lt;a href=&#34;#git-author-rewrite&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Curl down the &lt;code&gt;git-author-rewrite&lt;/code&gt; script and edit the following variables &lt;code&gt;OLD_EMAIL&lt;/code&gt; &lt;code&gt;CORECT_NAME&lt;/code&gt; &lt;code&gt;CORRECT_EMAIL&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;curl https://gist.githubusercontent.com/octocat/0831f3fbd83ac4d46451/raw/c197afe3e9ea2e4218f9fccbc0f36d2b8fd3c1e3/git-author-rewrite.sh &amp;gt; git-author-rewrite.sh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Run the script, and push the updates.&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;bash git-author-rewrite.sh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git push --force --tags origin &lt;span class=&#34;s1&#34;&gt;&amp;#39;refs/heads/**&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;cleanup&#34;&gt;Cleanup &lt;a href=&#34;#cleanup&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Delete the &lt;code&gt;--bare&lt;/code&gt; repo from your local machine.&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; ..&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;rm -rf repo.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I hope this helps someone, or future me who needs to fix their information in git.&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>remove git cruft</title>
    <id>https://go.waylonwalker.com/git-rm-cruft/</id>
    <updated>2019-01-21T00:00:00Z</updated>
    <published>2019-01-21T00:00:00Z</published>
    <link href="https://go.waylonwalker.com/git-rm-cruft/" rel="alternate" type="text/html"></link>
    <summary type="text">My original inspiration for this post came from steven ostermiller&#39;s blog post that no longer exists from my last check in May, 2024.</summary>
    <content type="html">&lt;h2 id=&#34;inspiration&#34;&gt;inspiration &lt;a href=&#34;#inspiration&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;My original inspiration for this post came from steven ostermiller’s blog post&#xA;that no longer exists from my last check in May, 2024.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.ostermiller.org/removing-and-purging-files-from-git-history/&#34; class=&#34;hoverlink&#34;&gt;https://blog.ostermiller.org/removing-and-purging-files-from-git-history/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I was able to find it on the way back machine though.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://web.archive.org/web/20240222195617/https://blog.ostermiller.org/removing-and-purging-files-from-git-history/&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/web.archive.org.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/web.archive.org.ico&#34; class=&#34;has-avatar  has-avatar-before&#34;&gt;https://web.archive.org/web/20240222195617/https://blog.ostermiller.org/removing-and-purging-files-from-git-history/&lt;/a&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;git log --all --pretty&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;format: --name-only --diff-filter&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;D &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed -r &lt;span class=&#34;s1&#34;&gt;&amp;#39;s|[^/]+$||g&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sort -u&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git filter-branch --tag-name-filter cat --index-filter &lt;span class=&#34;s1&#34;&gt;&amp;#39;git rm -r --cached --ignore-unmatch FILE_LIST&amp;#39;&lt;/span&gt; --prune-empty -f -- --all&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;rm -rf .git/refs/original/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git reflog expire --expire&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;now --all&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git gc --aggressive --prune&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;now&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git push origin --force --all&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git push origin --force --tags&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; MY_LOCAL_GIT_REPO&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git fetch origin&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git rebase&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git reflog expire --expire&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;now --all&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git gc --aggressive --prune&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;now&#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>