Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'd recommend using the <a href="http://rtyley.github.com/bfg-repo-cleaner/" rel="nofollow">BFG Repo-Cleaner</a>, a simpler, faster alternative to <code>git-filter-branch</code> specifically designed for rewriting files from Git history. One way in which it makes your life easier here is that it actually handles <em>all</em> references by default (all tags, branches, etc) but it's also <a href="https://docs.google.com/spreadsheet/ccc?key=0AsR1d5Zpes8HdER3VGU1a3dOcmVHMmtzT2dsS2xNenc" rel="nofollow">10 - 50x</a> faster.</p> <p>You should carefully follow these steps here: <a href="http://rtyley.github.com/bfg-repo-cleaner/#usage" rel="nofollow">http://rtyley.github.com/bfg-repo-cleaner/#usage</a> - but the core bit is just this: download the <a href="http://rtyley.github.com/bfg-repo-cleaner/#download" rel="nofollow">BFG's jar</a> (requires Java 6 or above) and run this command:</p> <pre><code>$ java -jar bfg.jar --replace-text replacements.txt my-repo.git </code></pre> <p>The <code>replacements.txt</code> file should contain all the substitutions you want to do, in a format like this (one entry per line - note the comments shouldn't be included):</p> <pre class="lang-bsh prettyprint-override"><code>pa$$word # Replace literal string 'pa$$word' - with '***REMOVED***' by default Copyright Volte==&gt;Copyright MegaCorp # Replace, specifiying replacement text regex:Copyright \w+==&gt;Copyright MegaCorp # Replace, using a regex regex:Copyright (\d{4}) \w+==&gt;Copyright $1 MegaCorp # Replace with reference </code></pre> <p>Your entire repository history will be scanned, and any non-binary files (under 1MB in size) will have the substitutions performed: any matching string (that isn't in your <em>latest</em> commit) will be replaced.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload