Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>try the BFG instead of git filter-branch...</h2> <p>You can use a <em>much</em> more friendly substitution format if you use <a href="http://rtyley.github.io/bfg-repo-cleaner/" rel="nofollow">The BFG</a> rather than <code>git-filter-branch</code>. Create a <code>passwords.txt</code> file, with one password per line like this:</p> <pre class="lang-bsh prettyprint-override"><code>PASSWORD1==&gt;xXxXx # Replace literal string 'PASSWORD1' with 'xXxXx' ezxcdf\fr$sdd%==&gt;xXxXx # ...all text is matched as a *literal* string by default </code></pre> <p>Then <a href="http://rtyley.github.io/bfg-repo-cleaner/#usage" rel="nofollow">run the BFG</a> with this command:</p> <pre><code>$ java -jar bfg.jar -fi '*.php' --replace-text passwords.txt my-repo.git </code></pre> <p>Your entire repository history will be scanned, and all <code>.php</code> 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> <h2>...no escaping needed</h2> <p>Note that the only bit of parsing the BFG does with here with the substitution file is to split on the '<code>==&gt;</code>' string - which probably <em>isn't</em> in your passwords - and all text is interpreted literally by default.</p> <p>If you want to be even more concise, you can drop the '<code>==&gt;</code>' and everything that comes after it on each line (ie, <em>just have a file of passwords</em>) and The BFG will replace each password with the string '<code>***REMOVED***</code>' by default.</p> <p>The BFG is typically <a href="http://rtyley.github.io/bfg-repo-cleaner/#speed" rel="nofollow">hundreds of times faster</a> than running <code>git-filter-branch</code> on a big repo and the options are tailored around these two common use-cases:</p> <ul> <li>Removing <strong>Crazy Big Files</strong></li> <li>Removing <strong>Passwords, Credentials</strong> &amp; other <strong>Private data</strong></li> </ul> <p><em>Full disclosure: I'm the author of the BFG Repo-Cleaner.</em></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

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