 {"id":519675,"date":"2025-08-06T10:57:22","date_gmt":"2025-08-06T17:57:22","guid":{"rendered":"https:\/\/jorgep.com\/blog\/?p=519675"},"modified":"2026-04-21T19:33:10","modified_gmt":"2026-04-22T02:33:10","slug":"git-lite-managing-large-repos-and-the-multi-remote-secret","status":"publish","type":"post","link":"https:\/\/jorgep.com\/blog\/git-lite-managing-large-repos-and-the-multi-remote-secret\/","title":{"rendered":"Git Lite: Managing Large Repos and the Multi-Remote Secret"},"content":{"rendered":"<style>.wp-block-kadence-advancedheading.kt-adv-heading519190_4a1b6f-84, .wp-block-kadence-advancedheading.kt-adv-heading519190_4a1b6f-84[data-kb-block=\"kb-adv-heading519190_4a1b6f-84\"]{font-size:var(--global-kb-font-size-sm, 0.9rem);font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading519190_4a1b6f-84 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading519190_4a1b6f-84[data-kb-block=\"kb-adv-heading519190_4a1b6f-84\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading519190_4a1b6f-84 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading519190_4a1b6f-84[data-kb-block=\"kb-adv-heading519190_4a1b6f-84\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<p class=\"kt-adv-heading519190_4a1b6f-84 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading519190_4a1b6f-84\">AI Disclaimer I love exploring new technology, and that includes using AI to help with research and editing! My digital &#8220;team&#8221; includes tools like Google Gemini, Notebook LM, Microsoft Copilot, Perplexity.ai, Claude.ai, and others as needed. They help me gather insights and polish content\u2014so you get the best, most up-to-date information possible.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><em>How to keep your laptop lean while syncing to the NAS and GitHub<\/em><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>A while back I wrote <a href=\"https:\/\/jorgep.com\/blog\/managing-my-dev-codebase-and-workflow\/\" data-type=\"post\" data-id=\"519673\">Managing my Dev Codebase and Workflow<\/a>, where I shared how I use my NAS as a central hub for my dev work. But as any hobbyist knows, once you start using Git seriously, you hit a snag: <strong>Git repositories can get massive.<\/strong> If you track every change in a project with large assets, your <code>.git<\/code> folder can eventually dwarf your actual code. On a laptop with limited SSD space, this is a problem. Today, I\u2019m sharing my &#8220;Git Lite&#8221; approach and how I use the &#8220;Multi-Remote&#8221; secret to sync my code exactly where it needs to go.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The &#8220;Git Lite&#8221; Philosophy: Why Not Everything is in Git<\/h2>\n\n\n\n<p>One reality of Git is that it stores the <strong>entire history<\/strong> of every file change locally on your machine. For a long-running project with large assets or frequent binary updates, your local storage can vanish quickly.<\/p>\n\n\n\n<p>This is why I use a &#8220;Git Lite&#8221; approach:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>The Heavy Stuff Stays Non-Git:<\/strong> For projects with massive datasets or videos, I keep them in my <code>Z:\\DevCode\\nonGit<\/code> folder. I don&#8217;t need a version history of a 2GB zip file.<\/li>\n\n\n\n<li><strong>The &#8220;Check-Out&#8221; Method:<\/strong> I only keep the active projects on my laptop. Once a project is &#8220;done,&#8221; I push it to the NAS and delete the local folder. The NAS holds the heavy history; my laptop stays light.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">The Multi-Remote Secret: NAS vs. GitHub<\/h2>\n\n\n\n<p>A common misconception is that a Git project can only live in one place (like GitHub). In reality, Git allows for <strong>Multiple Remotes<\/strong>. This is the &#8220;secret sauce&#8221; of my workflow.<\/p>\n\n\n\n<p>My local projects often have two different &#8220;remotes&#8221; (destinations):<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong><code>nas<\/code><\/strong>: My private, local NAS. This is my &#8220;Private Workshop.&#8221;<\/li>\n\n\n\n<li><strong><code>origin<\/code><\/strong>: GitHub or GitLab. This is my &#8220;Public Gallery.&#8221;<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">How it Works in Practice<\/h3>\n\n\n\n<p>When I&#8217;m working, I can choose exactly where my code goes.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>The Daily Sync:<\/strong> Throughout the day, I run <code>git push nas<\/code>. This is lightning fast because it stays on my home network. It saves every messy, &#8220;work-in-progress&#8221; commit that I\u2019m not ready to show the world.<\/li>\n\n\n\n<li><strong>The Public Release:<\/strong> Once the code is polished and the feature is done, I run <code>git push origin<\/code>. This sends the clean version to GitHub for the world to see.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">How to Set It Up<\/h3>\n\n\n\n<p>If you already have a project, adding a second destination is a single command:<\/p>\n\n\n\n<p>Bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Add your NAS as a destination\ngit remote add nas Z:\\DevCode\\git\\MyProject.git\n\n# Add GitHub as a destination\ngit remote add origin https:\/\/github.com\/username\/MyProject.git\n<\/code><\/pre>\n\n\n\n<p>Now, when I want to see where my code can go, I just type <code>git remote -v<\/code>. It shows me both my private NAS and my public GitHub.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Handling the &#8220;Mismatched&#8221; Accounts<\/h2>\n\n\n\n<p>Because I\u2019m a hobbyist, I have different projects for different interests. Some belong to my personal GitHub, some to a specialized organization account, and some are strictly private.<\/p>\n\n\n\n<p>With this setup, the &#8220;mismatch&#8221; is no longer a problem:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Project A<\/strong> pushes to <strong>NAS<\/strong> + <strong>Personal GitHub<\/strong>.<\/li>\n\n\n\n<li><strong>Project B<\/strong> pushes to <strong>NAS<\/strong> + <strong>Work\/Org GitHub<\/strong>.<\/li>\n\n\n\n<li><strong>Project C<\/strong> (Private\/Large) <strong>only<\/strong> pushes to the <strong>NAS<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p>My laptop remains the &#8220;middleman.&#8221; It doesn&#8217;t care that the destinations are different; it just follows the map I&#8217;ve given it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What about Git LFS?<\/h2>\n\n\n\n<p>Some people ask about <strong>Git LFS (Large File Storage)<\/strong>. While LFS is a &#8220;pro&#8221; way to handle big files in Git by replacing them with &#8220;pointers,&#8221; I&#8217;ve found it&#8217;s often overkill for hobbyists. My &#8220;Git Lite&#8221; approach\u2014keeping heavy projects in the <code>nonGit<\/code> folder and using the <code>robocopy<\/code> script\u2014is much simpler to maintain and doesn&#8217;t require complex server-side plugins on the NAS.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>By separating my <strong>history<\/strong> (on the NAS) from my <strong>active work<\/strong> (on the Laptop), and using <strong>Multi-Remotes<\/strong> to bridge the gap to GitHub, I\u2019ve created a workflow that is:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Lean:<\/strong> My laptop SSD isn&#8217;t choked by years of history.<\/li>\n\n\n\n<li><strong>Private:<\/strong> My messy &#8220;in-progress&#8221; code stays on my NAS.<\/li>\n\n\n\n<li><strong>Flexible:<\/strong> I can sync different projects to different GitHub accounts without breaking a sweat.<\/li>\n<\/ul>\n\n\n\n<p>It took some trial and error to get here, but &#8220;Git Lite&#8221; is the reason I can finally focus on coding instead of managing files!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to keep your laptop lean while syncing to the NAS and GitHub A while back I wrote Managing my Dev Codebase and Workflow, where I shared how I use my NAS as a central hub for my dev work. But as any hobbyist knows, once you start using Git seriously, you hit a snag:&#8230;<\/p>\n","protected":false},"author":2,"featured_media":461826,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","ngg_post_thumbnail":0,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[441,446],"tags":[431,1014,548],"class_list":["post-519675","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-talk","category-tips-tools-resources","tag-devops","tag-git","tag-nas"],"taxonomy_info":{"category":[{"value":441,"label":"Tech Talk"},{"value":446,"label":"Tips, Tools &amp; Resources"}],"post_tag":[{"value":431,"label":"DevOps"},{"value":1014,"label":"Git"},{"value":548,"label":"nas"}]},"featured_image_src_large":["https:\/\/jorgep.com\/blog\/wp-content\/uploads\/jorgep-BlogPostGeneric.jpg",1024,512,false],"author_info":{"display_name":"Jorge Pereira","author_link":"https:\/\/jorgep.com\/blog\/author\/jorge\/"},"comment_info":0,"category_info":[{"term_id":441,"name":"Tech Talk","slug":"tech-talk","term_group":0,"term_taxonomy_id":451,"taxonomy":"category","description":"","parent":0,"count":686,"filter":"raw","cat_ID":441,"category_count":686,"category_description":"","cat_name":"Tech Talk","category_nicename":"tech-talk","category_parent":0},{"term_id":446,"name":"Tips, Tools &amp; Resources","slug":"tips-tools-resources","term_group":0,"term_taxonomy_id":456,"taxonomy":"category","description":"","parent":0,"count":85,"filter":"raw","cat_ID":446,"category_count":85,"category_description":"","cat_name":"Tips, Tools &amp; Resources","category_nicename":"tips-tools-resources","category_parent":0}],"tag_info":[{"term_id":431,"name":"DevOps","slug":"devops","term_group":0,"term_taxonomy_id":441,"taxonomy":"post_tag","description":"","parent":0,"count":6,"filter":"raw"},{"term_id":1014,"name":"Git","slug":"git","term_group":0,"term_taxonomy_id":1024,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":548,"name":"nas","slug":"nas","term_group":0,"term_taxonomy_id":558,"taxonomy":"post_tag","description":"","parent":0,"count":5,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts\/519675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/comments?post=519675"}],"version-history":[{"count":4,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts\/519675\/revisions"}],"predecessor-version":[{"id":519680,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts\/519675\/revisions\/519680"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/media\/461826"}],"wp:attachment":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/media?parent=519675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/categories?post=519675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/tags?post=519675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}