{
  "version": "https://jsonfeed.org/version/1.1",
  "title": "chem-bla-ics",
  "description": "Chemblaics (pronounced chem-bla-ics) is the science that uses open science and computers to solve problems in chemistry, biochemistry and related fields.",
  "home_page_url": "https://chem-bla-ics.linkedchemistry.info/",
  "feed_url": "https://chem-bla-ics.linkedchemistry.info/2020/07/02/bioclipse-git-experiences-1-strip-away.json",
  "icon": "https://chem-bla-ics.linkedchemistry.info/assets/images/chem-bla-ics_logo.png",
  "language": "en",
  "authors": [
    {
      "name": "Egon Willighagen",
      "url": "https://orcid.org/0000-0001-7542-0286",
      "_orcid": "0000-0001-7542-0286"
    }
  ],
  "items": [

    {
      "id": "https://doi.org/10.59350/a75k0-fjg73",
      "url": "https://chem-bla-ics.linkedchemistry.info/2020/07/02/bioclipse-git-experiences-1-strip-away.html",
      "title": "Bioclipse git experiences #1: Strip away unwanted plugins",
      "content_html": "<p>This is a series of two posts repeating some content I <a href=\"https://web.archive.org/web/20180821111520/http://wiki.bioclipse.net/index.php?title=Git_Development\">wrote up back in the Bioclipse days</a>\n(see also <a href=\"https://scholia.toolforge.org/topic/Q1769726\">this Scholia page</a>). They both deal with something\nwe were facing: restructuring of version control repositories, while actually keeping the history. For\nexample, you may want to copy or move code from one repository to another. A second use case can be a file\nthat must be removed (there are valid reasons for that). Because these posts are based on Bioclipse work,\nthere will be some specific terminology, but the approach I regularly apply in other situations.</p>\n\n<p>For this first post, think of a <em>plugin</em> as a subfolder, tho it even applies to files.</p>\n\n<h2 id=\"strip-away-unwanted-plugins\">Strip away unwanted plugins</h2>\n\n<p>In this case, you remove everything you do not want in your new git repository. Do:</p>\n\n<div class=\"language-shell highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>git clone <span class=\"nt\">--bare</span> <span class=\"nt\">--no-hardlinks</span> old.local.clone/ new.local.clone/\n</code></pre></div></div>\n\n<p>Then use:</p>\n\n<div class=\"language-shell highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>git filter-branch <span class=\"nt\">--index-filter</span> <span class=\"s1\">'git rm -r -q --cached --ignore-unmatch plugins/net.bioclipse.actionHistory plugins/net.bioclipse.analysis'</span> HEAD\n</code></pre></div></div>\n\n<p>It often happens that you need to run the above command several times, in cases when there are many subdirectories to be removed.\nWhen you removed all the bits you need removed, you can clean up the repository and reduce the size considerably with:</p>\n\n<div class=\"language-shell highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> git repack <span class=\"nt\">-ad</span><span class=\"p\">;</span> git prune\n</code></pre></div></div>",
      "summary": "This is a series of two posts repeating some content I wrote up back in the Bioclipse days (see also this Scholia page). They both deal with something we were facing: restructuring of version control repositories, while actually keeping the history. For example, you may want to copy or move code from one repository to another. A second use case can be a file that must be removed (there are valid reasons for that). Because these posts are based on Bioclipse work, there will be some specific terminology, but the approach I regularly apply in other situations.",
      
      "date_published": "2020-07-02T00:00:00+00:00",
      "date_modified": "2025-02-15T00:00:00+00:00",
      "tags": ["bioclipse","git"],
      
      
      
      
      
      
        "authors": [ { "name": "Egon Willighagen", "url": "https://orcid.org/0000-0001-7542-0286" } ]
      
    }

  ]
}
