Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Because you used <code>git revert</code>, those files are still referenced in your repository. It sounds like this was your basic sequence:</p> <pre><code>git add &lt;a bunch of stuff including big files&gt; git commit # creates a commit including the unwanted files # realize mistake git revert HEAD # this creates a new commit on top of the previous one, # that simply undoes all the changes in the previous commit # now trying to push </code></pre> <p>If you have no other commits in your <code>master</code> since (or in between) the bad commit and the reversion of the bad commit (in other words your graph looks like (where Z is the last good commit):</p> <pre><code> .....Z--A--A' &lt;- master </code></pre> <p>then the following should help:</p> <pre><code> git reset --hard Z </code></pre> <p>This will reset your <code>master</code> branch back to <code>Z</code>, along with your working directory and index, which means it will look like the bad commit and the reversion never happened.</p> <p>If there are other commits after the <code>A</code> point in the above, you'll need to use <code>git rebase -i Z</code>, and delete the two lines corresponding to <code>A</code> and <code>A'</code> instead.</p> <p>If there are other changes in <code>A</code> that you want to keep (i.e. it wasn't just the big files that got committed there), you'll need to use the <code>git rebase -i</code> route, and mark <code>A</code> for <code>edit</code>. This will cause <code>rebase</code> to stop at the point it's just done the <code>A</code> commit, and then you can do this:</p> <pre><code> git rm --cached &lt;big files&gt; # remove the files from your index git commit --amend # fix up the last commit git rebase --continue # let rebase finish up the rest </code></pre> <p>Once you've done either of the above, <code>git push</code> should be able to proceed again...</p>
    singulars
    1. This table or related slice is empty.
    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.
    3. VO
      singulars
      1. This table or related slice is empty.
    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