<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Git on staticnotes.org</title>
    <link>/tags/git/</link>
    <description>Recent content in Git on staticnotes.org</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <lastBuildDate>Mon, 01 Jan 0001 00:00:00 +0000</lastBuildDate>
    <atom:link href="/tags/git/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>TIL how to set up multiple SSH keys (for multiple Github accounts)</title>
      <link>/til/2025/11/how-to-set-up-multiple-ssh-keys/</link>
      <pubDate>Fri, 28 Nov 2025 16:20:00 +0000</pubDate>
      <guid>/til/2025/11/how-to-set-up-multiple-ssh-keys/</guid>
      <description>&lt;p&gt;Setting up SSH keys is one of these things I need to do every couple of months. Inevitably, I don&amp;rsquo;t remember how to do it and then follow some tutorial, e.g. the &#xA;&lt;a href=&#34;https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent&#34; &#xA;&#xA;    target=&#34;_blank&#34;&#xA;    &gt;Github Docs&#xA;    &#xA;        &lt;span style=&#34;white-space: nowrap&#34;&gt;&amp;thinsp;&lt;svg&#xA;            style=&#34;height: 0.7em; width: 0.7em; padding-left: -0.2em;&#34; focusable=&#34;false&#34; data-prefix=&#34;fas&#34; data-icon=&#34;external-link-alt&#34;&#xA;            class=&#34;svg-inline--fa fa-external-link-alt fa-w-16&#34; role=&#34;img&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&#xA;            viewBox=&#34;0 0 512 512&#34;&gt;&#xA;            &lt;path fill=&#34;currentColor&#34;&#xA;                d=&#34;M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z&#34;&gt;&#xA;            &lt;/path&gt;&#xA;        &lt;/svg&gt;&#xA;    &lt;/span&gt;&#xA;        &#xA;    &#xA;&lt;/a&gt;. It kind of always works but I haven&amp;rsquo;t fully internalized how to properly manage those different SSH keys.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Disclaimer&lt;/em&gt;: This learning was provoked by setting up multiple SSH keys for different Github accounts (I know how to do that) and then being able to &lt;code&gt;git clone {private-repository}&lt;/code&gt; a private repository with the correct ssh key (I didn&amp;rsquo;t know how to do that). An example use case could be a personal and professional Github account that don&amp;rsquo;t have access to the same private repositories. So ideally when we git clone we want to automatically pick the right ssh key.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How Core Git Developers Configure Git</title>
      <link>/feed/2025/02/how-core-git-developers-configure-git/</link>
      <pubDate>Tue, 25 Feb 2025 14:02:17 +0000</pubDate>
      <guid>/feed/2025/02/how-core-git-developers-configure-git/</guid>
      <description>&lt;p&gt;Interesting discussion of git config options that the git core developers favor and that are not (yet) defaults. There are some nice suggestions. For example, I didn&amp;rsquo;t know that&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git config --global push.autoSetupRemote &lt;span class=&#34;nb&#34;&gt;true&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;existed. If you haven&amp;rsquo;t defined an upstream for a branch yet, git will automatically set it for you. So you don&amp;rsquo;t have to run&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git push --set-upstream origin my-branch-name&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;anymore.&lt;/p&gt;&#xA;&lt;p&gt;Some other options I adopted from this post:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
