<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Git on D. Sébastien Taggart</title>
    <link>https://www.sebastientaggart.com/tags/git/</link>
    <description>Recent content in Git on D. Sébastien Taggart</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 04 Oct 2026 23:02:59 -0400</lastBuildDate>
    <atom:link href="https://www.sebastientaggart.com/tags/git/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Per-repo SSH keys for Git with core.sshCommand</title>
      <link>https://www.sebastientaggart.com/writing/git-per-repo-ssh-key-with-core-ssh-command/</link>
      <pubDate>Wed, 02 Aug 2023 20:18:43 -0400</pubDate>
      <guid>https://www.sebastientaggart.com/writing/git-per-repo-ssh-key-with-core-ssh-command/</guid>
      <description>Store the right SSH identity in each clone’s .git/config so you stop prefixing every Git command or maintaining a giant ~/.ssh/config.</description>
      <content:encoded><![CDATA[<p>If you keep more than one GitHub (or GitLab, or whatever) identity, you usually end up with more than one private key. The usual fixes are <code>Host</code> aliases in <code>~/.ssh/config</code>, or typing <code>GIT_SSH_COMMAND='ssh -i ~/.ssh/some_key -o IdentitiesOnly=yes' git …</code> before every command. Both work. Neither is what I want when I just opened a random repo in a deep path and want my fingers to do the right thing.</p>
<p><strong>Reminder:</strong> you can pin the SSH command on a single clone:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git config core.sshCommand <span class="s2">&#34;ssh -i ~/.ssh/your_private_key -F /dev/null&#34;</span>
</span></span></code></pre></div><p>That lands in <code>.git/config</code> for that repository only. Every <code>git fetch</code>, <code>git pull</code>, <code>git push</code> from that directory uses that key. No wrapper script, no repeated env var.</p>
<p><code>-F /dev/null</code> tells <code>ssh</code> not to read your normal config file for that invocation. That matters when your global config would otherwise offer several keys and confuse <code>github.com</code> about which one you meant. Pair with <code>-o IdentitiesOnly=yes</code> if your agent still tries to hand out the wrong identity first.</p>
<p>This does not travel with the remote (<code>.git/config</code> stays local), so a fresh clone needs the line again, or you automate it once in a bootstrap script. For “this laptop folder always means my work GitHub,” that tradeoff is usually fine.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Install and Enable GIT Large File Support in OSX</title>
      <link>https://www.sebastientaggart.com/writing/install-and-enable-git-large-file-support-in-osx/</link>
      <pubDate>Tue, 09 Oct 2018 12:38:46 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/install-and-enable-git-large-file-support-in-osx/</guid>
      <description>&lt;p&gt;If you’re navigating the challenges of large files in your Git repository—think audio clips, videos, or substantial datasets—Git Large File Storage (LFS) is your ally. In essence, it replaces bulky files with lightweight text pointers within Git, while the actual content resides on a remote server, such as GitHub. This approach not only streamlines your repository but also enhances collaboration among team members.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-started-with-git-lfs-on-osx&#34;&gt;Let’s Get Started with GIT LFS on OSX:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Install Git LFS&lt;/strong&gt;&lt;br&gt;
First up, let’s get Git LFS installed using Homebrew. Open your terminal and execute the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;brew install git-lfs
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Initialize LFS in Your Repository&lt;/strong&gt;&lt;br&gt;
Navigate to your project directory. Once you’re there, kickstart Git LFS by running:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git lfs install
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If everything goes as planned, you’ll see the reassuring message: &amp;ldquo;Git LFS initialized.&amp;rdquo;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Identify Large Files&lt;/strong&gt;&lt;br&gt;
With LFS set up, it’s time to pinpoint the largest files in your repository. This step is essential for determining what needs tracking. Execute this command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;find ~/Documents/path/to/repo -type f -exec du -h &lt;span class=&#34;o&#34;&gt;{}&lt;/span&gt; + &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sort -rh &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; head -n &lt;span class=&#34;m&#34;&gt;10&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This command will present your top ten largest files, providing clarity on what you might want to manage using LFS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Track File Types&lt;/strong&gt;&lt;br&gt;
Now that you’ve identified the heavy hitters, instruct Git LFS to track specific file types. For instance, if you’re working with video files, you might run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git lfs track &lt;span class=&#34;s1&#34;&gt;&amp;#39;*.mp4&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To view a list of all the paths, files, and types you’ve chosen to track, simply run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git lfs track
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;</description>
      <content:encoded><![CDATA[<p>If you’re navigating the challenges of large files in your Git repository—think audio clips, videos, or substantial datasets—Git Large File Storage (LFS) is your ally. In essence, it replaces bulky files with lightweight text pointers within Git, while the actual content resides on a remote server, such as GitHub. This approach not only streamlines your repository but also enhances collaboration among team members.</p>
<h3 id="lets-get-started-with-git-lfs-on-osx">Let’s Get Started with GIT LFS on OSX:</h3>
<ol>
<li>
<p><strong>Install Git LFS</strong><br>
First up, let’s get Git LFS installed using Homebrew. Open your terminal and execute the following command:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">brew install git-lfs
</span></span></code></pre></div></li>
<li>
<p><strong>Initialize LFS in Your Repository</strong><br>
Navigate to your project directory. Once you’re there, kickstart Git LFS by running:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git lfs install
</span></span></code></pre></div><p>If everything goes as planned, you’ll see the reassuring message: &ldquo;Git LFS initialized.&rdquo;</p>
</li>
<li>
<p><strong>Identify Large Files</strong><br>
With LFS set up, it’s time to pinpoint the largest files in your repository. This step is essential for determining what needs tracking. Execute this command:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">find ~/Documents/path/to/repo -type f -exec du -h <span class="o">{}</span> + <span class="p">|</span> sort -rh <span class="p">|</span> head -n <span class="m">10</span>
</span></span></code></pre></div><p>This command will present your top ten largest files, providing clarity on what you might want to manage using LFS.</p>
</li>
<li>
<p><strong>Track File Types</strong><br>
Now that you’ve identified the heavy hitters, instruct Git LFS to track specific file types. For instance, if you’re working with video files, you might run:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git lfs track <span class="s1">&#39;*.mp4&#39;</span>
</span></span></code></pre></div><p>To view a list of all the paths, files, and types you’ve chosen to track, simply run:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git lfs track
</span></span></code></pre></div></li>
</ol>
<h3 id="why-bother-with-git-lfs">Why Bother with Git LFS?</h3>
<p>Managing large files can often feel like herding cats—especially in collaborative environments where every byte counts. By employing Git LFS, you not only enhance your repository’s performance but also facilitate smoother teamwork with heavy assets.</p>
<h3 id="whats-next">What’s Next?</h3>
<p>After setting up Git LFS, it&rsquo;s worth reflecting on your file management approach. Are there additional large files lurking in your projects that require attention? How might this strategy reshape your collaboration with your team?</p>
<p>Embracing tools like Git LFS is about more than just file management—it’s about refining your development workflow and fostering a more efficient collaborative environment. Let’s iterate on this process together and explore where it leads us. Happy coding!</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
