<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Frankie Yuen</title>
    <description>The latest articles on DEV Community by Frankie Yuen (@frankie_yuen_01e380ac42b8).</description>
    <link>https://dev.to/frankie_yuen_01e380ac42b8</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1315199%2F44cb2180-712a-4eca-a394-a86b32e4a2ca.png</url>
      <title>DEV Community: Frankie Yuen</title>
      <link>https://dev.to/frankie_yuen_01e380ac42b8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/frankie_yuen_01e380ac42b8"/>
    <language>en</language>
    <item>
      <title>Large SDK and GitHub</title>
      <dc:creator>Frankie Yuen</dc:creator>
      <pubDate>Tue, 20 Jan 2026 16:40:06 +0000</pubDate>
      <link>https://dev.to/frankie_yuen_01e380ac42b8/large-sdk-and-github-hb8</link>
      <guid>https://dev.to/frankie_yuen_01e380ac42b8/large-sdk-and-github-hb8</guid>
      <description>&lt;p&gt;When working with large SDKs, version control can quickly become a challenge. I have been working with &lt;strong&gt;rv1126b_linux6.1_sdk_v1.1.0&lt;/strong&gt; - totals over &lt;strong&gt;13 GB&lt;/strong&gt;, exceeding &lt;a href="https://docs.github.com/en/get-started/using-git/troubleshooting-the-2-gb-push-limit" rel="noopener noreferrer"&gt;GitHub's 2 GiB per push limit&lt;/a&gt;, requiring staged commits.&lt;/p&gt;

&lt;p&gt;To profile disk usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; rv1126b_linux6.1_sdk_v1.1.0/&lt;span class="k"&gt;*&lt;/span&gt; | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-hr&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Top consumers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;4.2G    external
3.7G    prebuilts
2.0G    rtos
1.6G    kernel-6.1
1.1G    docs
954M    ubuntu
634M    tools
354M    debian
340M    device
242M    buildroot
160M    app
127M    u-boot
112M    yocto
80M     rkbin
51M     hal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;external&lt;/strong&gt; and &lt;strong&gt;prebuilts&lt;/strong&gt; dominate due to binaries and toolchains. &lt;a href="https://github.com/topics/rv1126" rel="noopener noreferrer"&gt;GitHub rv1126 topic&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Git LFS Setup
&lt;/h2&gt;

&lt;p&gt;For files &amp;gt;100MB, enable Git LFS early:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git lfs &lt;span class="nb"&gt;install
&lt;/span&gt;git lfs track &lt;span class="s2"&gt;"*.bin"&lt;/span&gt; &lt;span class="s2"&gt;"*.img"&lt;/span&gt; &lt;span class="s2"&gt;"prebuilts/**/*"&lt;/span&gt; &lt;span class="s2"&gt;"external/**/*"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"prebuilts/**/* filter=lfs diff=lfs merge=lfs -text"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; .gitattributes
git add .gitattributes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Track patterns for SDK binaries (e.g., firmware images, toolchains) to avoid bloat. Commit &lt;code&gt;.gitattributes&lt;/code&gt; first. Prune unused LFS objects regularly: &lt;code&gt;git lfs prune&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
&lt;a href="https://dev.to/arasosman/managing-large-repositories-with-git-lfs-and-sparse-checkout-2ek7"&gt;Git LFS + Sparse Checkout&lt;/a&gt; | &lt;br&gt;
&lt;a href="https://mslinn.com/git/5300-git-lfs-patterns-tracking.html" rel="noopener noreferrer"&gt;Git LFS Patterns&lt;/a&gt; | &lt;br&gt;
&lt;a href="https://gitprotect.io/blog/best-practices-for-securing-git-lfs-on-github-gitlab-bitbucket-and-azure-devops/" rel="noopener noreferrer"&gt;Git LFS Security&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Staged Pushing Workflow
&lt;/h2&gt;

&lt;p&gt;Split initial commit via interactive rebase or directory batches:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Repack for delta compression (helps with similar binaries)&lt;/span&gt;
git repack &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--depth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;50 &lt;span class="nt"&gt;--window&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;250

&lt;span class="c"&gt;# Push directories sequentially&lt;/span&gt;
git add external/ &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add external"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main
git add prebuilts/ &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add prebuilts"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git push
&lt;span class="c"&gt;# Repeat for others &amp;lt;2GiB&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Monitoring &amp;amp; Optimization
&lt;/h2&gt;

&lt;p&gt;Post-push verification:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git count-objects &lt;span class="nt"&gt;-vH&lt;/span&gt; &lt;span class="nt"&gt;-q&lt;/span&gt;  &lt;span class="c"&gt;# Quick stats&lt;/span&gt;
git lfs ls-files          &lt;span class="c"&gt;# List tracked LFS files&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clean history if needed: &lt;code&gt;git filter-repo --strip-blobs-bigger-than 100M&lt;/code&gt; (rewrites history; force-push). Enable sparse-checkout for clones: &lt;code&gt;git sparse-checkout set prebuilts kernel&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
&lt;a href="https://dev.to/arasosman/managing-large-repositories-with-git-lfs-and-sparse-checkout-2ek7"&gt;Git LFS Guide&lt;/a&gt; | &lt;br&gt;
&lt;a href="https://wellarchitected.github.com/library/architecture/recommendations/scaling-git-repositories/large-git-repositories/" rel="noopener noreferrer"&gt;Large Git Repos&lt;/a&gt; | &lt;br&gt;
&lt;a href="https://github.com/orgs/community/discussions/167608" rel="noopener noreferrer"&gt;GitHub Discussion&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Advanced: Repo Size Reduction
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Split giant initial commit: &lt;code&gt;git rebase -i --root&lt;/code&gt;, mark as &lt;code&gt;edit&lt;/code&gt;, then &lt;code&gt;git reset HEAD~ &amp;amp;&amp;amp; git add &amp;lt;subset&amp;gt; &amp;amp;&amp;amp; git commit&lt;/code&gt;.
&lt;a href="https://gist.github.com/robandpdx/86831d48ab7312f844a9e4ec2348b30a" rel="noopener noreferrer"&gt;Split Commits Gist&lt;/a&gt; | 
&lt;a href="https://stackoverflow.com/questions/6217156/break-a-previous-commit-into-multiple-commits" rel="noopener noreferrer"&gt;StackOverflow Rebase&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Multi-pack-index for large packs: &lt;code&gt;git multi-pack-index repack --batch-size=1g&lt;/code&gt;. &lt;a href="https://stackoverflow.com/questions/50996930/is-repacking-a-repository-useful-for-large-binaries" rel="noopener noreferrer"&gt;Git Repack&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Exclude docs/build artifacts via &lt;code&gt;.gitignore&lt;/code&gt;: &lt;code&gt;external/docs/&lt;/code&gt;, &lt;code&gt;build/&lt;/code&gt;. &lt;a href="https://dev.to/arasosman/managing-large-repositories-with-git-lfs-and-sparse-checkout-2ek7"&gt;Sparse Checkout&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These techniques keep operations efficient for 10GB+ repos. &lt;a href="https://wellarchitected.github.com/library/architecture/recommendations/scaling-git-repositories/large-git-repositories/" rel="noopener noreferrer"&gt;GitHub Large Repos&lt;/a&gt;&lt;/p&gt;




</description>
      <category>devops</category>
      <category>iot</category>
      <category>productivity</category>
      <category>github</category>
    </item>
  </channel>
</rss>
