[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: assistance with git error
From:       Jeff King <peff () peff ! net>
Date:       2015-02-24 21:56:58
Message-ID: 20150224215658.GA23488 () peff ! net
[Download RAW message or body]

On Tue, Feb 24, 2015 at 04:49:00PM -0500, Thomas Moretto wrote:

> i also have a question concerning large files.

Sure, but let's take it back on-list. Then other people can help answer,
and later users can benefit from seeing the answers.

> i ran a check and it said there was a schema.sql file that was 1.2G(i followed this \
> guide:  http://stevelorek.com/how-to-shrink-a-git-repository.html)

Running verify-pack like that is slow. If you have a recent version of
git, you can use:

  git rev-list --objects --all |
  git cat-file --batch-check='%(objectsize:disk) %(objectname) %(rest)' |
  sort -rn

to get a sorted list of the largest objects that are reachable. If you
don't see your big object there, try doing:

  git rev-list --objects --reflog

for the first line, to see if it shows up in the reflog.

If the object is only in the reflog, the simplest thing is to expire the
reflog and repack:

  git reflog expire --expire-unreachable=now --all
  git gc --prune=now

If it is reachable, then you'll have to actually rewrite history to get
rid of it. Since you know the sha1 of the object, you can find which
commit introduced it with:

  sha1=...whatever...
  git log --all --no-abbrev --raw | less +/$sha1

That will dump you in less, with the sha1 highlighted (if it comes and
goes through history, you may need to use "/" to find other instances).

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic