Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7860023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:07:17+00:00 2026-06-02T22:07:17+00:00

Somewhere along the line, some huge, huge file got added to the git repository

  • 0

Somewhere along the line, some huge, huge file got added to the git repository of a project I own. When I go to clone this project on a new machine, the project appears to get “stuck” on 37% for a loooong time. This project should clone in just a couple of minutes.

How can I find out what object(s) are causing this lengthy cloning time?

I know how to “git rm” files. Will that remove it, even if it is some old object that only exists in the history?

I am not really clear if, once you “git rm” a file, if it is removed from the repository completely, or just going forward.

Any help is deeply appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T22:07:21+00:00Added an answer on June 2, 2026 at 10:07 pm

    Pro Git has a great, step-by-step explanation of how to do this. It takes a bit of work, but can be reliably done. I can’t take credit for the following explanation — I am just stealing it from that website (see the original website for a more detailed description):

    1. Pack your repo:

      $ git gc
      
    2. Find the largest items in the git database. The following command will list the three biggest ones, with the biggest one being the last line of output (the example below includes both the command you would type and also sample output):

      # In the following command, replace the pack*.idx filename
      # with whatever filename you find in the .git/objects/pack
      # directory:
      $ git verify-pack -v .git/objects/pack/pack-3f8c0...bb.idx | sort -k 3 -n | tail -3
      e3f094f522629ae358806b17daf78246c27c007b blob   1486 734 4667
      05408d195263d853f09dca71d55116663690c27c blob   12908 3478 1189
      7a9eb2fba2b1811321254ac360970fc169ba2330 blob   2056716 2056872 5401
      
    3. Ask what filename is associated with that biggest blob:

      $ git rev-list --objects --all | grep 7a9eb2fb
      7a9eb2fba2b1811321254ac360970fc169ba2330 git.tbz2
      
    4. Get the history of that file:

      $ git log --pretty=oneline -- git.tbz2
      da3f30d019005479c99eb4c3406225613985a1db oops - removed large tarball
      6df764092f3e7c8f5f94cbe08ee5cf42e92a0289 added git tarball
      
    5. Use git filter-branch to remove all references to that file:

      $ git filter-branch --index-filter \
         'git rm --cached --ignore-unmatch git.tbz2' -- 6df7640^..
      Rewrite 6df764092f3e7c8f5f94cbe08ee5cf42e92a0289 (1/2)rm 'git.tbz2'
      Rewrite da3f30d019005479c99eb4c3406225613985a1db (2/2)
      Ref 'refs/heads/master' was rewritten
      
    6. Clean up a few remaining references to this blob, and then gc again to re-pack:

      $ rm -Rf .git/refs/original
      $ rm -Rf .git/logs/
      $ git gc
      Counting objects: 19, done.
      Delta compression using 2 threads.
      Compressing objects: 100% (14/14), done.
      Writing objects: 100% (19/19), done.
      Total 19 (delta 3), reused 16 (delta 1)
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Somewhere along the line from the DB to the application, this: sauté is getting
Somewhere some guy said (I honestly do not know where I got this from),
My custom error messages quit working somewhere along the way and I'm getting this
Something really weird is happening: when I call foo(100*1.0f), somewhere along the line that
i was thinking along the line when design some interfaces and classes whether i
I have an MVC application which uses a silverlight control. Somewhere along the line
Somewhere along the line, my app started crashing on the iPad though it still
Somewhere along the line I picked up the notion that using iframes is 'bad
(big) (big) Somewhere along the way into the function animationWithFrames , my vector loses
Somewhere in a large html file : <td headers=fee style=cursor:pointer; onclick=toggle('detailinfo088180');> $675.00 </td> blabla<br><em>$650</em>>blabla/a>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.