title: Am I supposed to run BFG on the mirrored repo or the original?
body: <p>I want to delete two files from my git repo that aren't there anymore. </p>
  
  <p>I put them in, committed, and tried to push but they were too large. So I took them out, and kept working, then committed, tried to push, but it still gave me the same error. I figured they're still in the history somewhere.</p>
  
  <p>I think I made the problem worse because I kept working in that branch and made 1 more commit. Then I merged that branch back to the master branch.</p>
  
  <p>So I searched for a solution and found <a href="https://rtyley.github.io/bfg-repo-cleaner/" rel="noreferrer">bfg</a>.</p>
  
  <p>But the instructions on the page don't make sense to me.</p>
  
  <p>First off, </p>
  
  <pre><code>$ git clone --mirror git://example.com/some-big-repo.git
  </code></pre>
  
  <p>Where am I supposed to clone from? My remote repo on github.com doesn't have the commits and the merge I did since I added the large files. But the instructions make it seem like I'm supposed to get it from there anyway. (I cloned from my local repo.)</p>
  
  <p>Next,</p>
  
  <pre><code>$ java -jar bfg.jar --strip-blobs-bigger-than 100M some-big-repo.git
  </code></pre>
  
  <p>Is <code>some-big-repo.git</code> the mirrored repo or the normal local repo?
  (I used the mirrored repo for this.)</p>
  
  <p>And then I checked that my history had been updated and tried,</p>
  
  <pre><code>$ cd some-big-repo.git
  $ git reflog expire --expire=now --all &amp;&amp; git gc --prune=now --aggressive
  </code></pre>
  
  <p>(I was in the mirrored clone for this) I got an error.</p>
  
  <pre><code>remote: error: refusing to update checked out branch: refs/heads/master
  remote: error: By default, updating the current branch in a non-bare repository
  remote: error: is denied, because it will make the index and work tree inconsistent
  remote: error: with what you pushed, and will require 'git reset --hard' to match
  remote: error: the work tree to HEAD.
  remote: error: 
  remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
  remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
  remote: error: its current branch; however, this is not recommended unless you
  remote: error: arranged to update its work tree to match what you pushed in some
  remote: error: other way.
  remote: error: 
  remote: error: To squelch this message and still keep the default behaviour, set
  remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
  To /home/cole/main_repo
   + 94b9a0d...c7c4317 work -&gt; work (forced update)
   ! [remote rejected] master -&gt; master (branch is currently checked out)
  error: failed to push some refs to '/home/cole/main_repo'
  </code></pre>
  
  <p>This makes sense to me. Yeah I do currently have <code>master</code> checked out. But then, what else was I supposed to do? I can only see problems happening if I try it another way.</p>